import{o as u,c,a as l,w as p,A as m,r as f,d as g,s as h,K as b,g as _,f as v,h as x,t as V,u as i,m as w}from"./vendor-3-7-99.js";import{u as y}from"./Page-3-7-99.js";const k={class:"flex gap-2 items-center"},M={class:"relative inline-flex items-center cursor-pointer"},S={class:"ml-3 text-sm font-medium text-gray-900"},T={__name:"Toggle",props:["modelValue"],emits:["update:modelValue"],setup(d,{emit:a}){const s=d,n=a,r=g({get(){return s.modelValue},set(t){n("update:modelValue",t)}});return(t,e)=>(u(),c("div",k,[l("label",M,[p(l("input",{"onUpdate:modelValue":e[0]||(e[0]=o=>r.value=o),type:"checkbox",class:"sr-only peer"},null,512),[[m,r.value]]),e[1]||(e[1]=l("div",{class:"w-11 h-6 bg-gray-200 peer-focus:outline-none peer-focus:ring-4 peer-focus:ring-blue-300 rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-blue-600"},null,-1)),l("span",S,[f(t.$slots,"default")])])]))}},$={class:"flex gap-2 items-center"},E={__name:"TestMode",setup(d){const a=y(),{isTestMode:s}=h(a),{t:n}=b(),r=async t=>{await a.updateTestMode(t);const e=jQuery("#wp-admin-bar-gurmepos");t?(e.addClass("gpos-test-mode-active"),e.children("a").children("span").children("span.ab-label").html(`POS Entegratör ${n("test_mode")}`)):(e.removeClass("gpos-test-mode-active"),e.children("a").children("span").children("span.ab-label").html("POS Entegratör"))};return(t,e)=>(u(),c("div",$,[_(T,{id:"gpos-test-mode",modelValue:i(s),"onUpdate:modelValue":e[0]||(e[0]=o=>w(s)?s.value=o:null),onChange:e[1]||(e[1]=o=>r(i(s)))},{default:v(()=>[x(V(t.$t("test_mode")),1)]),_:1},8,["modelValue"])]))}};export{E as _};
