2 lines
1.9 KiB
JavaScript
2 lines
1.9 KiB
JavaScript
import{B}from"./B7_GJxBp.js";import{_ as N}from"./D6mBh3eP.js";import{d as O,G as L,r as m,K as R,a1 as z,ae as _,o as V,F as D,z as H,D as o,A as s,B as u,H as n,C as l,a4 as h,as as v,E as x}from"./vNwORUzZ.js";import{_ as T,R as $}from"./BwFejD95.js";import"./Blutjsi5.js";import{_ as j}from"./DlAUqK2U.js";const A={class:"h-20vh px-5 mt3"},E={class:"font-semibold text-xl"},F={class:"mt5 rounded-xl border-gray-200 border-solid border-1px py-2"},G=O({__name:"ChangeLanguage",props:{open:{type:Boolean}},emits:["update:open"],setup(y,{emit:C}){const t=L(),i=m(null),r=m("en"),S=y,p=C;function w(e){t.lang=e.target.value,c()}const d=R({display:"flex",height:"40px",lineHeight:"40px"});z(S,e=>{e.open?k():c()});async function k(){var e;await _(),await((e=i.value)==null?void 0:e.setOpen())}async function c(){var e;await _(),await((e=i.value)==null?void 0:e.setClose()),p("update:open",!1)}return V(()=>{r.value=t.lang}),(e,a)=>{const f=$,b=T;return H(),D(B,{title:"",ref_key:"sheetRef",ref:i,headerCls:"",closeOnClickOutside:"",onOnClickOutside:a[1]||(a[1]=g=>p("update:open",!1))},{header:o(()=>[a[2]||(a[2]=s("div",{flex:"","justify-center":"","items-center":"","flex-col":"","p-2":""},[s("div",{"bg-gray-500":"","h-2px":"","w-2.5rem":""})],-1)),s("div",null,[l(N,{class:"w-1rem mt-5 ms-5",onClick:c})])]),default:o(()=>[s("div",A,[s("div",E,u(n(t).useString("selectYourLanguage")),1),s("div",F,[l(b,{value:r.value,"onUpdate:value":a[0]||(a[0]=g=>r.value=g),class:"lang-login w-full pe2",onChange:w},{default:o(()=>[l(f,{style:v(d),value:"en",class:h(n(t).isNightStore?"text-white":"text-black")},{default:o(()=>[x(u(n(t).useString("english")),1)]),_:1},8,["style","class"]),l(f,{style:v(d),value:"fa",class:h(n(t).isNightStore?"text-white":"text-black")},{default:o(()=>[x(u(n(t).useString("persian")),1)]),_:1},8,["style","class"])]),_:1},8,["value"])])])]),_:1},512)}}}),J=j(G,[["__scopeId","data-v-5af94a0b"]]);export{J as C};
|