| Current Path : /home/users/unlimited/www/whatsapp-crm/public/build/assets/ |
| Current File : /home/users/unlimited/www/whatsapp-crm/public/build/assets/Timezone-f9b92575.js |
import{r as g,T as h,h as v,f as b,o as c,a as e,t as l,e as d,u as r,n as a,c as f,g as w}from"./app-43851608.js";import V from"./App-2fea9171.js";import{_ as u}from"./FormSelect-2d73589a.js";import"./App-ad5f7ecb.js";import"./Sidebar-7bb6d772.js";import"./Menu-4221d61f.js";import"./ProfileModal-628e5b7c.js";import"./FormInput-4a309017.js";import"./LangToggle-8d05b0dc.js";import"./MobileSidebar-b73cd192.js";import"./index-99011d5f.js";/* empty css */import"./Sidebar-7b5bc85b.js";import"./index-17cd980e.js";import"./use-text-value-242aa4d7.js";import"./ChevronUpDownIcon-8859f144.js";const x={class:"text-xl mb-1"},z={class:"mb-6 flex items-center text-sm leading-6 text-gray-600"},$=e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 24 24"},[e("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 11v5m0 5a9 9 0 1 1 0-18a9 9 0 0 1 0 18Zm.05-13v.1h-.1V8h.1Z"})],-1),k={class:"ml-1 mt-1"},A={class:"space-y-12"},C={class:"pb-12"},B={class:"grid gap-6 grid-cols-2 pb-10 border-b md:w-2/3"},T={class:"mt-6 flex items-center justify-end gap-x-6 md:w-2/3"},q={type:"button",class:"text-sm leading-6 text-gray-900"},Z=["disabled"],j={key:0,xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24"},M=e("path",{fill:"currentColor",d:"M12 2A10 10 0 1 0 22 12A10 10 0 0 0 12 2Zm0 18a8 8 0 1 1 8-8A8 8 0 0 1 12 20Z",opacity:".5"},null,-1),S=e("path",{fill:"currentColor",d:"M20 12h2A10 10 0 0 0 12 2V4A8 8 0 0 1 20 12Z"},[e("animateTransform",{attributeName:"transform",dur:"1s",from:"0 12 12",repeatCount:"indefinite",to:"360 12 12",type:"rotate"})],-1),U=[M,S],N={key:1},ee={__name:"Timezone",props:{config:{type:Object,required:!0},timezones:{type:Array,required:!0},date_formats:{type:Array,required:!0},time_formats:{type:Array,required:!0},currencies:{type:Array,required:!0}},setup(y){const i=y,m=s=>{const o=i.config.find(n=>n.key===s);return o?o.value:""},p=g(!1),t=h({timezone:m("timezone"),currency:m("currency"),date_format:m("date_format"),time_format:m("time_format")}),_=async()=>{t.put("/admin/settings?type=timezone",{preserveScroll:!0})};return(s,o)=>(c(),v(V,null,{default:b(()=>[e("div",null,[e("h2",x,l(s.$t("Timezone and currency")),1),e("p",z,[$,e("span",k,l(s.$t("Configure timezone, date and time formats and currency")),1)])]),e("form",{onSubmit:o[4]||(o[4]=w(n=>_(),["prevent"]))},[e("div",A,[e("div",C,[e("div",B,[d(u,{modelValue:r(t).timezone,"onUpdate:modelValue":o[0]||(o[0]=n=>r(t).timezone=n),name:s.$t("Timezone"),type:"text",options:i.timezones,error:r(t).errors.timezone,class:a("col-span-2")},null,8,["modelValue","name","options","error"]),d(u,{modelValue:r(t).date_format,"onUpdate:modelValue":o[1]||(o[1]=n=>r(t).date_format=n),name:s.$t("Date format"),type:"text",options:i.date_formats,error:r(t).errors.date_format,class:a("col-span-1")},null,8,["modelValue","name","options","error"]),d(u,{modelValue:r(t).time_format,"onUpdate:modelValue":o[2]||(o[2]=n=>r(t).time_format=n),name:s.$t("Time format"),type:"text",options:i.time_formats,error:r(t).errors.time_format,class:a("col-span-1")},null,8,["modelValue","name","options","error"]),d(u,{modelValue:r(t).currency,"onUpdate:modelValue":o[3]||(o[3]=n=>r(t).currency=n),name:s.$t("Currency"),type:"text",options:i.currencies,error:r(t).errors.currency,class:a("col-span-2")},null,8,["modelValue","name","options","error"])]),e("div",T,[e("button",q,l(s.$t("Cancel")),1),e("button",{class:a(["inline-flex justify-center rounded-md border border-transparent bg-primary px-4 py-2 text-sm text-white focus:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2",{"opacity-50":p.value}]),disabled:p.value},[p.value?(c(),f("svg",j,U)):(c(),f("span",N,l(s.$t("Save")),1))],10,Z)])])])],32)]),_:1}))}};export{ee as default};