import{A as S}from"./AmaTRG5a.js";import{_ as w}from"./DIkWVjrx.js";import{u as $,s as k,z as V,j as p,l as j,d as U,w as A,o as B,b as e,t as n,E as C,D as M,m as a,f as D,G as i,J as c,K as m,I as g}from"./Bgmy51Qv.js";import{u as E}from"./7pZkuj9N.js";import"./DuhDFJjj.js";import"./CNIrc0EA.js";const I={class:"mb-20 mb-sm-15"},N={class:"input-wrapper block"},R={class:"input-wrapper single-line"},T=["placeholder"],q={class:"input-wrapper block"},z={class:"input-wrapper single-line"},G=["placeholder"],W={__name:"analytics",setup(O){const{setRequest:_,getRequest:P}=E(),d=$(),{setting:r}=k(d),{getSetting:b}=d,{setErrors:f}=V(),t=p({enable_ga:!1,enable_pixel:!1,ga_id:"",pixel_id:""}),u=p(!1),v=p(!1),h=async()=>{f(),u.value=!0,await _({params:t.value,api:"analytics"}),u.value=!1};return j(async()=>{r.value||(gettingStore.value=!0,await b(),t.value=Object.assign({},r.value),gettingStore.value=!1),t.value=Object.assign({},r.value)}),(s,l)=>{const x=S,y=w;return B(),U(y,{"active-route":"analytics",class:"mb-5"},{rightArea:A(()=>[e("h4",I,n(s.$t("title.ana")),1),e("form",{class:M({"has-error":a(v)}),onSubmit:C(h,["prevent"])},[e("label",N,[i(e("input",{type:"checkbox","onUpdate:modelValue":l[0]||(l[0]=o=>a(t).enable_ga=o),"true-value":1,"false-value":0},null,512),[[m,a(t).enable_ga]]),c(" "+n(s.$t("title.ega"))+"!! ",1)]),e("div",R,[e("label",null,n(s.$t("title.gaId")),1),i(e("input",{type:"text",placeholder:s.$t("title.eGa"),"onUpdate:modelValue":l[1]||(l[1]=o=>a(t).ga_id=o)},null,8,T),[[g,a(t).ga_id]])]),e("label",q,[i(e("input",{type:"checkbox","onUpdate:modelValue":l[2]||(l[2]=o=>a(t).enable_pixel=o),"true-value":1,"false-value":0},null,512),[[m,a(t).enable_pixel]]),c(" "+n(s.$t("title.pixel")),1)]),e("div",z,[e("label",null,n(s.$t("title.pixelId")),1),i(e("input",{type:"text",placeholder:s.$t("title.ePixel"),"onUpdate:modelValue":l[3]||(l[3]=o=>a(t).pixel_id=o)},null,8,G),[[g,a(t).pixel_id]])]),D(x,{class:"primary-btn",text:s.$t("setting.sv"),"fetching-data":a(u)},null,8,["text","fetching-data"])],34)]),_:1})}}};export{W as default};
