File: /home/dmstechonline/whatsapp.dmstech.online/public/build/assets/Whatsapp-2ae7abc9.js
import{r as h,T as k,f as $,g as A,o as r,a as e,c as p,t as o,h as V,b as c,j as m,u as a,n as u,k as w,O as x}from"./app-884e4ce3.js";import ke from"./Layout-fc347332.js";import{_ as $e}from"./EmbeddedSignupBtn-a8b5363c.js";import{_ as ce}from"./Modal-a947e544.js";import{_ as f}from"./FormInput-ab713954.js";import{_ as Ae}from"./FormSelect-1f27a419.js";import"./index-ff0eb693.js";/* empty css */import{_ as Ve}from"./FormImageLogo-b0c68f01.js";import{_ as Ce}from"./FormTextArea-3daa517d.js";import"./index-d349a931.js";import"./App-faae56c7.js";import"./Sidebar-ec4f7223.js";import"./Menu-58091ecb.js";import"./ProfileModal-268f6e59.js";import"./FormPhoneInput-8c055c19.js";/* empty css */import"./transition-15fedc5d.js";import"./hidden-733404a0.js";import"./use-outside-click-1c7dcbeb.js";import"./micro-task-89dcd6af.js";import"./tabs-3ad99d3f.js";import"./use-resolve-button-type-261165f4.js";import"./LangToggle-54d6b98e.js";import"./OrganizationModal-83fb7cbd.js";import"./use-text-value-48384026.js";import"./MobileSidebar-4319591b.js";import"./pusher-e63f75b9.js";import"./useRtl-295d8c04.js";const Ze={class:"md:h-[90vh]"},Se={class:"flex justify-center items-center mb-8"},Me={class:"md:w-[60em]"},Be={key:0,class:"bg-white border border-slate-200 rounded-lg py-2 text-sm mb-4"},Ie={class:"flex items-center px-4 pt-2 pb-4"},Ne={class:"w-[70%]"},Ee={class:"text-[17px]"},Te={class:"flex items-center mt-1"},Ue={class:"ml-auto"},Oe={key:1,class:"bg-white border border-slate-200 rounded-lg py-2 text-sm mb-4"},Pe={class:"grid grid-cols-4 items-center px-4 gap-x-4 py-2 border-b relative"},Re={class:"border-r"},je={class:"border-r"},Fe={class:"border-r"},De={class:"bg-slate-50 py-1 px-2 rounded-md w-[fit-content] text-xs"},We={key:1,class:"flex items-center absolute right-0 top-0 text-xs mr-1 space-x-2 p-1 px-2 bg-slate-50 rounded-xl"},Le={class:"grid grid-cols-4 items-center px-4 gap-x-4 py-2"},He={class:"border-r"},Ge={key:0,class:"border-r"},Ye={class:"bg-slate-50 py-1 px-2 rounded-md w-[fit-content] text-xs"},ze={class:"border-r"},Je={class:"bg-slate-50 py-1 px-2 rounded-md w-[fit-content] text-xs"},qe={class:"bg-slate-50 py-1 px-2 rounded-md w-[fit-content] text-xs"},Qe={class:"flex items-center justify-between px-4 pt-2 pb-4"},Ke={class:"text-[17px]"},Xe={class:"flex items-center mt-1"},es={class:"flex space-x-10 border-b w-full px-4 py-6"},ss={class:"w-[40%]"},ts={class:"text-slate-600"},os={class:"text-xs text-slate-700 flex items-center"},ls={class:"w-[60%]"},as={class:"ml-6"},is={class:"ml-6"},ns={class:"flex space-x-10 border-b w-full px-4 py-6"},rs={class:"w-[40%]"},ds={class:"text-slate-600"},ps={class:"text-xs text-slate-700 flex items-center"},us={class:"w-[60%]"},ms={class:"flex space-x-10 border-b w-full px-4 py-6"},cs={class:"w-[40%]"},vs={class:"text-slate-600"},hs={class:"text-xs text-slate-700 flex items-center"},fs={class:"w-[60%]"},bs={class:"flex space-x-10 border-b w-full px-4 py-6"},ws={class:"w-[40%]"},gs={class:"text-slate-600"},_s={class:"text-xs text-slate-700 flex items-center"},xs={class:"w-[60%]"},ys={class:"flex space-x-10 w-full px-4 py-6"},ks={class:"w-[40%]"},$s={class:"text-slate-600"},As={class:"text-xs text-slate-700 flex items-center"},Vs={class:"w-[60%]"},Cs={class:"flex px-4 pt-1 pb-2"},Zs={class:"ml-auto"},Ss=["disabled"],Ms={key:0,xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24"},Bs={key:1},Is={key:3,class:"bg-white border border-slate-200 rounded-lg py-2 text-sm mb-4"},Ns={class:"px-4 pt-2 pb-4"},Es={class:"text-[17px]"},Ts={class:"flex items-center mt-1"},Us={class:"flex space-x-10 border-b w-full px-4 py-4"},Os={class:"w-[40%]"},Ps={class:"text-slate-600"},Rs={class:"text-left w-[60%]"},js={class:"w-48 break-all"},Fs={class:"flex space-x-10 w-full px-4 py-4"},Ds={class:"w-[40%]"},Ws={class:"text-slate-600"},Ls={class:"text-left w-[60%]"},Hs={class:"text-left"},Gs={key:4,class:"bg-white border border-slate-200 rounded-lg py-2 text-sm mb-20"},Ys={class:"flex items-center px-4 pt-2 pb-4"},zs={class:"w-[60%]"},Js={class:"text-[17px]"},qs={class:"flex items-center mt-1"},Qs={class:"w-[40%] ml-auto"},Ks={class:"mt-5 grid grid-cols-1 gap-x-6 gap-y-4"},Xs={class:"mt-4 flex"},et=["disabled"],st={key:0,xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24"},tt={key:1},ot={class:"mt-5 grid grid-cols-1 gap-x-6 gap-y-4"},lt={class:"mt-4 flex"},at=["disabled"],it={key:0,xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24"},nt={key:1},Ot={__name:"Whatsapp",props:["settings","embeddedSignupActive","appId","configId","graphAPIVersion","modules"],setup(C){var S,M,B,I,N,E,T,U,O,P,R,j,F,D,W;const v=C;h(!1);const Z=h(v.settings.metadata),ve=h(window.location.origin),g=h(!1),_=h(!1),t=h(Z.value?JSON.parse(Z.value):null),y=h(!1),d=k({app_id:t.value&&t.value.whatsapp?t.value.whatsapp.app_id:null,access_token:t.value&&t.value.whatsapp?t.value.whatsapp.access_token:null,phone_number_id:t.value&&t.value.whatsapp?t.value.whatsapp.phone_number_id:null,waba_id:t.value&&t.value.whatsapp?t.value.whatsapp.waba_id:null}),n=k({profile_picture_url:t.value&&t.value.whatsapp?(B=(M=(S=t.value)==null?void 0:S.whatsapp)==null?void 0:M.business_profile)==null?void 0:B.profile_picture_url:null,description:t.value&&t.value.whatsapp?(E=(N=(I=t.value)==null?void 0:I.whatsapp)==null?void 0:N.business_profile)==null?void 0:E.description:null,address:t.value&&t.value.whatsapp?(O=(U=(T=t.value)==null?void 0:T.whatsapp)==null?void 0:U.business_profile)==null?void 0:O.address:null,email:t.value&&t.value.whatsapp?(j=(R=(P=t.value)==null?void 0:P.whatsapp)==null?void 0:R.business_profile)==null?void 0:j.email:null,industry:t.value&&t.value.whatsapp?(W=(D=(F=t.value)==null?void 0:F.whatsapp)==null?void 0:D.business_profile)==null?void 0:W.industry:null,websites:[]}),b=k({access_token:t.value&&t.value.whatsapp?t.value.whatsapp.access_token:null}),he=[{label:"Automotive",value:"AUTO"},{label:"Beauty, spa and salon",value:"BEAUTY"},{label:"Clothing",value:"APPAREL"},{label:"Education",value:"EDU"},{label:"Entertainment",value:"ENTERTAIN"},{label:"Event planning and service",value:"EVENT_PLAN"},{label:"Finance and banking",value:"FINANCE"},{label:"Food and groceries",value:"GROCERY"},{label:"Public service",value:"GOVT"},{label:"Hotel and lodging",value:"HOTEL"},{label:"Medical and health",value:"HEALTH"},{label:"Charity",value:"NONPROFIT"},{label:"Professional services",value:"PROF_SERVICES"},{label:"Shopping and retail",value:"RETAIL"},{label:"Travel and transportation",value:"TRAVEL"},{label:"Restaurant",value:"RESTAURANT"},{label:"Not a business",value:"NOT_A_BIZ"},{label:"Undefined",value:"UNDEFINED"},{label:"Other",value:"OTHER"}];function fe(){g.value=!0}function be(){_.value=!0}const we=()=>{d.post("/settings/whatsapp",{preserveScroll:!0,preserveState:!1,onSuccess:()=>{g.value=!1}})},ge=()=>{n.post("/settings/whatsapp/business-profile",{preserveScroll:!0})},_e=()=>{b.post("/settings/whatsapp/token",{preserveScroll:!0,onSuccess:()=>{_.value=!1}})},xe=()=>{y.value=!0,x.visit("/settings/whatsapp/refresh",{method:"get",preserveState:!0,onFinish:()=>{y.value=!1},onSuccess:()=>{x.visit("/settings/whatsapp",{preserveState:!1})}})},ye=()=>{x.delete("/settings/whatsapp/business-profile",{onBefore:()=>confirm("Are you sure you want to delete your integration?"),preserveState:!0,onSuccess:()=>{x.visit("/settings/whatsapp",{preserveState:!1})}})};return(l,s)=>(r(),$(ke,{modules:v.modules},{default:A(()=>{var L,H,G,Y,z,J,q,Q,K,X,ee,se,te,oe,le,ae,ie,ne,re,de,pe,ue,me;return[e("div",Ze,[e("div",Se,[e("div",Me,[(L=t.value)!=null&&L.whatsapp?c("",!0):(r(),p("div",Be,[e("div",Ie,[e("div",Ne,[e("h2",Ee,o(l.$t("Setup Whatsapp Account")),1),e("span",Te,o(l.$t("Setup your integration to be able to receive and send messages via Whatsapp.")),1)]),e("div",Ue,[C.embeddedSignupActive==1?(r(),$($e,{key:0,appId:v.appId,configId:v.configId,graphAPIVersion:v.graphAPIVersion},null,8,["appId","configId","graphAPIVersion"])):(r(),p("button",{key:1,onClick:s[0]||(s[0]=i=>fe()),class:"bg-primary text-white p-2 rounded-lg text-sm mt-5 flex px-3 w-fit"},[V(o(l.$t("Setup whatsapp"))+" ",1),s[19]||(s[19]=e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20"},[e("g",{fill:"currentColor","fill-rule":"evenodd","clip-rule":"evenodd"},[e("g",{opacity:".2"},[e("path",{d:"M12.206 5.848a1.5 1.5 0 0 1 2.113.192l3.333 4a1.5 1.5 0 1 1-2.304 1.92l-3.334-4a1.5 1.5 0 0 1 .192-2.112Z"}),e("path",{d:"M12.206 16.152a1.5 1.5 0 0 1-.192-2.112l3.334-4a1.5 1.5 0 0 1 2.304 1.92l-3.333 4a1.5 1.5 0 0 1-2.113.192Z"}),e("path",{d:"M16 11a1.5 1.5 0 0 1-1.5 1.5h-8a1.5 1.5 0 0 1 0-3h8A1.5 1.5 0 0 1 16 11Z"})]),e("path",{d:"M11.347 5.616a.5.5 0 0 1 .704.064l3.333 4a.5.5 0 0 1-.768.64l-3.333-4a.5.5 0 0 1 .064-.704Z"}),e("path",{d:"M11.347 14.384a.5.5 0 0 1-.064-.704l3.333-4a.5.5 0 0 1 .768.64l-3.333 4a.5.5 0 0 1-.704.064Z"}),e("path",{d:"M15.5 10a.5.5 0 0 1-.5.5H5a.5.5 0 0 1 0-1h20a.5.5 0 0 1 .5.5Z"})])],-1))]))])])])),(H=t.value)!=null&&H.whatsapp?(r(),p("div",Oe,[e("div",Pe,[e("div",Re,[e("div",null,o(l.$t("Display name")),1),e("div",null,o((G=t.value.whatsapp)==null?void 0:G.verified_name),1)]),e("div",je,[e("div",null,o(l.$t("Connected number")),1),e("div",null,o((Y=t.value.whatsapp)==null?void 0:Y.display_phone_number),1)]),e("div",Fe,[e("div",null,o(l.$t("Message limits")),1),e("div",null,o((z=t.value.whatsapp)!=null&&z.messaging_limit_tier?(J=t.value.whatsapp)==null?void 0:J.messaging_limit_tier:"N/A"),1)]),e("div",null,[e("div",null,o(l.$t("Number status")),1),e("div",De,o((q=t.value.whatsapp)==null?void 0:q.number_status),1)]),y.value===!1?(r(),p("button",{key:0,onClick:s[1]||(s[1]=i=>xe()),class:"flex items-center absolute right-0 top-0 text-xs mr-1 space-x-2 p-1 px-2 bg-slate-50 rounded-xl"},[s[20]||(s[20]=e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24"},[e("path",{fill:"currentColor",d:"M12.079 2.25c-4.794 0-8.734 3.663-9.118 8.333H2a.75.75 0 0 0-.528 1.283l1.68 1.666a.75.75 0 0 0 1.056 0l1.68-1.666a.75.75 0 0 0-.528-1.283h-.893c.38-3.831 3.638-6.833 7.612-6.833a7.658 7.658 0 0 1 6.537 3.643a.75.75 0 1 0 1.277-.786A9.158 9.158 0 0 0 12.08 2.25m8.761 8.217a.75.75 0 0 0-1.054 0L18.1 12.133a.75.75 0 0 0 .527 1.284h.899c-.382 3.83-3.651 6.833-7.644 6.833a7.697 7.697 0 0 1-6.565-3.644a.75.75 0 1 0-1.277.788a9.197 9.197 0 0 0 7.842 4.356c4.808 0 8.765-3.66 9.15-8.333H22a.75.75 0 0 0 .527-1.284z"})],-1)),e("span",null,o(l.$t("Refresh")),1)])):(r(),p("button",We,s[21]||(s[21]=[e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24"},[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"}),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)])))]),e("div",Le,[e("div",He,[e("div",null,o(l.$t("Whatsapp business ac ID")),1),e("div",null,o((Q=t.value.whatsapp)==null?void 0:Q.waba_id),1)]),((K=t.value.whatsapp)==null?void 0:K.is_embedded_signup)==1?(r(),p("div",Ge,[e("div",null,o(l.$t("Phone verification status")),1),e("div",Ye,o((X=t.value.whatsapp)==null?void 0:X.code_verification_status),1)])):c("",!0),e("div",ze,[e("div",null,o(l.$t("Quality rating")),1),e("div",Je,o((ee=t.value.whatsapp)==null?void 0:ee.quality_rating),1)]),e("div",null,[e("div",null,o(l.$t("Account status")),1),e("div",qe,o((se=t.value.whatsapp)==null?void 0:se.account_review_status),1)])])])):c("",!0),(te=t.value)!=null&&te.whatsapp?(r(),p("form",{key:2,onSubmit:s[8]||(s[8]=w(i=>ge(),["prevent"])),class:"bg-white border border-slate-200 rounded-lg py-2 text-sm mb-4 pb-4"},[e("div",Qe,[e("div",null,[e("h2",Ke,o(l.$t("Business profile settings")),1),e("span",Xe,[s[22]||(s[22]=e("svg",{class:"mr-2",xmlns:"http://www.w3.org/2000/svg",width:"15",height:"15",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)),V(" "+o(l.$t("Setup the Whatsapp business profile for your number")),1)])]),e("div",null,[(oe=t.value)!=null&&oe.whatsapp&&((ae=(le=t.value)==null?void 0:le.whatsapp)==null?void 0:ae.is_embedded_signup)===0?(r(),p("button",{key:0,type:"button",onClick:s[2]||(s[2]=i=>be()),class:"bg-primary text-white p-2 rounded-lg text-sm mt-5 flex px-3 w-fit"},o(l.$t("Update token")),1)):c("",!0)])]),e("div",es,[e("div",ss,[e("span",ts,o(l.$t("Whatsapp profile picture")),1),e("div",os,[s[23]||(s[23]=e("svg",{class:"mr-1",xmlns:"http://www.w3.org/2000/svg",width:"15",height:"15",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)),e("span",null,o(l.$t("Add/update your profile picture")),1)])]),e("div",ls,[m(Ve,{modelValue:a(n).profile_picture_url,"onUpdate:modelValue":s[3]||(s[3]=i=>a(n).profile_picture_url=i),name:"",error:a(n).errors.profile_picture_url,label:l.$t("Upload logo"),imageUrl:a(n).profile_picture_url,class:u("col-span-4 ml-6")},null,8,["modelValue","error","label","imageUrl"]),e("div",as,o(l.$t("Accepted formats: JPG/PNG")),1),e("div",is,o(l.$t("Minimum dimensions: 192x192 pixels.")),1)])]),e("div",ns,[e("div",rs,[e("span",ds,o(l.$t("Business address")),1),e("div",ps,[s[24]||(s[24]=e("svg",{class:"mr-1",xmlns:"http://www.w3.org/2000/svg",width:"15",height:"15",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)),e("span",null,o(l.$t("Specify your physical business address")),1)])]),e("div",us,[m(f,{modelValue:a(n).address,"onUpdate:modelValue":s[4]||(s[4]=i=>a(n).address=i),error:a(n).errors.address,name:"",type:"text",class:u("col-span-4")},null,8,["modelValue","error"])])]),e("div",ms,[e("div",cs,[e("span",vs,o(l.$t("Business email")),1),e("div",hs,[s[25]||(s[25]=e("svg",{class:"mr-1",xmlns:"http://www.w3.org/2000/svg",width:"15",height:"15",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)),e("span",null,o(l.$t("Add your business email address")),1)])]),e("div",fs,[m(f,{modelValue:a(n).email,"onUpdate:modelValue":s[5]||(s[5]=i=>a(n).email=i),error:a(n).errors.email,name:"",type:"email",class:u("col-span-4")},null,8,["modelValue","error"])])]),e("div",bs,[e("div",ws,[e("span",gs,o(l.$t("Business description")),1),e("div",_s,[s[26]||(s[26]=e("svg",{class:"mr-1",xmlns:"http://www.w3.org/2000/svg",width:"15",height:"15",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)),e("span",null,o(l.$t("Edit your whatsapp business account description")),1)])]),e("div",xs,[m(Ce,{modelValue:a(n).description,"onUpdate:modelValue":s[6]||(s[6]=i=>a(n).description=i),error:a(n).errors.description,name:"",type:"text",class:u("col-span-4")},null,8,["modelValue","error"])])]),e("div",ys,[e("div",ks,[e("span",$s,o(l.$t("Business industry")),1),e("div",As,[s[27]||(s[27]=e("svg",{class:"mr-1",xmlns:"http://www.w3.org/2000/svg",width:"15",height:"15",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)),e("span",null,o(l.$t("Specify your business vertical")),1)])]),e("div",Vs,[m(Ae,{modelValue:a(n).industry,"onUpdate:modelValue":s[7]||(s[7]=i=>a(n).industry=i),name:"",type:"text",options:he,error:a(n).errors.industry,class:u("col-span-4")},null,8,["modelValue","error"])])]),e("div",Cs,[e("div",Zs,[e("button",{type:"submit",class:"float-right rounded-md bg-primary px-3 py-2 text-sm text-white shadow-sm hover:shadow-md hover:bg-primary focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600",disabled:a(n).processing},[a(n).processing?(r(),p("svg",Ms,s[28]||(s[28]=[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),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)]))):(r(),p("span",Bs,o(l.$t("Save")),1))],8,Ss)])])],32)):c("",!0),(ie=t.value)!=null&&ie.whatsapp&&((re=(ne=t.value)==null?void 0:ne.whatsapp)==null?void 0:re.is_embedded_signup)===0?(r(),p("div",Is,[e("div",Ns,[e("h2",Es,o(l.$t("Meta webhook settings")),1),e("span",Ts,[s[29]||(s[29]=e("svg",{class:"mr-2",xmlns:"http://www.w3.org/2000/svg",width:"15",height:"15",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)),V(" "+o(l.$t("Add these webhook settings to your facebook developer account")),1)])]),e("div",Us,[e("div",Os,[e("span",Ps,o(l.$t("Webhook url")),1)]),e("div",Rs,[e("span",js,o(ve.value+"/webhook/whatsapp/"+v.settings.identifier),1)])]),e("div",Fs,[e("div",Ds,[e("span",Ws,o(l.$t("Verify token")),1)]),e("div",Ls,[e("div",Hs,o(v.settings.identifier),1)])])])):c("",!0),(de=t.value)!=null&&de.whatsapp?(r(),p("div",Gs,[e("div",Ys,[e("div",zs,[e("h2",Js,o(l.$t("Remove Whatsapp account")),1),e("span",qs,o(l.$t("This will completely delete your whatsapp integration. Your contacts & messages will be unaffected.")),1)]),e("div",Qs,[e("button",{onClick:s[9]||(s[9]=i=>ye()),class:"float-right rounded-md bg-red-700 px-3 py-2 text-sm text-white shadow-sm hover:bg-red-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600"},o(l.$t("Delete integration")),1)])])])):c("",!0)])])]),m(ce,{label:l.$t("Whatsapp API config"),isOpen:g.value},{default:A(()=>[e("div",Ks,[e("form",{onSubmit:s[15]||(s[15]=w(i=>we(),["prevent"])),class:"grid gap-x-6 gap-y-4 sm:grid-cols-6"},[m(f,{modelValue:a(d).app_id,"onUpdate:modelValue":s[10]||(s[10]=i=>a(d).app_id=i),error:a(d).errors.app_id,name:l.$t("App ID"),type:"text",class:u("sm:col-span-6")},null,8,["modelValue","error","name"]),m(f,{modelValue:a(d).access_token,"onUpdate:modelValue":s[11]||(s[11]=i=>a(d).access_token=i),error:a(d).errors.access_token,name:l.$t("Access token"),type:"text",class:u("sm:col-span-6")},null,8,["modelValue","error","name"]),m(f,{modelValue:a(d).phone_number_id,"onUpdate:modelValue":s[12]||(s[12]=i=>a(d).phone_number_id=i),error:a(d).errors.phone_number_id,name:l.$t("Phone number ID"),type:"text",class:u("sm:col-span-6")},null,8,["modelValue","error","name"]),m(f,{modelValue:a(d).waba_id,"onUpdate:modelValue":s[13]||(s[13]=i=>a(d).waba_id=i),error:a(d).errors.waba_id,name:l.$t("Whatsapp business account ID"),type:"text",class:u("sm:col-span-6")},null,8,["modelValue","error","name"]),e("div",Xs,[e("button",{type:"button",onClick:s[14]||(s[14]=w(i=>g.value=!1,["self"])),class:"inline-flex justify-center rounded-md border border-transparent bg-slate-50 px-4 py-2 text-sm text-slate-500 hover:bg-slate-200 focus:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 mr-4"},o(l.$t("Cancel")),1),e("button",{class:u(["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":a(d).processing}]),disabled:a(d).processing},[a(d).processing?(r(),p("svg",st,s[30]||(s[30]=[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),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)]))):(r(),p("span",tt,o(l.$t("Save")),1))],10,et)])],32)])]),_:1},8,["label","isOpen"]),(pe=t.value)!=null&&pe.whatsapp&&((me=(ue=t.value)==null?void 0:ue.whatsapp)==null?void 0:me.is_embedded_signup)===0?(r(),$(ce,{key:0,label:l.$t("Whatsapp API config"),isOpen:_.value},{default:A(()=>[e("div",ot,[e("form",{onSubmit:s[18]||(s[18]=w(i=>_e(),["prevent"])),class:"grid gap-x-6 gap-y-4 sm:grid-cols-6"},[m(f,{modelValue:a(b).access_token,"onUpdate:modelValue":s[16]||(s[16]=i=>a(b).access_token=i),error:a(b).errors.access_token,name:l.$t("Access token"),type:"text",class:u("sm:col-span-6")},null,8,["modelValue","error","name"]),e("div",lt,[e("button",{type:"button",onClick:s[17]||(s[17]=w(i=>_.value=!1,["self"])),class:"inline-flex justify-center rounded-md border border-transparent bg-slate-50 px-4 py-2 text-sm text-slate-500 hover:bg-slate-200 focus:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 mr-4"},o(l.$t("Cancel")),1),e("button",{class:u(["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":a(d).processing}]),disabled:a(b).processing},[a(b).processing?(r(),p("svg",it,s[31]||(s[31]=[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),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)]))):(r(),p("span",nt,o(l.$t("Save")),1))],10,at)])],32)])]),_:1},8,["label","isOpen"])):c("",!0)]}),_:1},8,["modules"]))}};export{Ot as default};