import{b7 as q,as as S,a as w,de as y,aS as I,aT as k,bf as B,a$ as e,N as $,a_ as C,ba as N,b0 as t,b_ as d,bO as P,r as T,cU as R,B as E,aX as x}from"./index-xnhGKCfe.js";const F={class:"req-permi"},O={class:"req-permi-container"},U={class:"req-permi-icon"},V=["src"],M={class:"req-permi-header"},A={class:"req-permi-desc"},D={class:"req-permi-btnbox"},n="IS_SHOW_REQUEST_PERMISSION",G=q({__name:"ReqPermi",setup(H){const{emitFBToken:_,emitEngageLabToken:r}=E(),s=T(!1),c=S(),{pwaConfig:m}=w(),{requestPermission:f,isChooseAuth:i,initFirebase:v,uploadToken:h}=y(),l=async()=>{s.value=!1,f().finally(async()=>{i()&&(_(),r(),localStorage.setItem(n,"false"))})};return(async()=>{if(c.path.includes("indexpt1")){s.value=!1;return}if(c.path.includes("indexpt1")){s.value=!1;return}try{i()?(localStorage.setItem(n,"false"),s.value=!1):(localStorage.setItem(n,"true"),s.value=!0),await v(),r(),i()&&await h()}catch{}})(),(a,p)=>{const b=C,g=R;return k(),I(g,{class:"req-permi-popup",show:s.value,"onUpdate:show":p[0]||(p[0]=o=>s.value=o),position:"top",closeable:!1,"close-on-click-overlay":!1,"destroy-on-close":!0},{default:B(()=>{var o,u;return[e("div",F,[$(b,{name:"req_permi_close",onClick:l,class:"req-permi-btn--close"}),e("div",O,[e("div",U,[e("img",{src:(u=(o=N(m))==null?void 0:o.pwaImage)==null?void 0:u.pwaSmallImg},null,8,V)]),e("div",null,[e("div",M,t(a.$t("t802")),1),e("div",A,[d(t(a.$t("t803"))+" ",1),e("span",null,t(a.$t("t804")),1),d(" "+t(a.$t("t805")),1)])])]),e("div",D,[e("button",{class:"req-permi-btn--confirm",onClick:P(l,["stop"])},t(a.$t("t806")),1)])])]}),_:1},8,["show"])}}}),Q=x(G,[["__scopeId","data-v-d0669d8f"]]);export{Q as default};
