Your IP : 216.73.217.77


Current Path : /home/users/unlimited/www/whatsapp-crm/public/build/assets/
Upload File :
Current File : /home/users/unlimited/www/whatsapp-crm/public/build/assets/Whatsapp-4d143054.js

import{r as h,T as k,i as $,g as A,o as n,a as e,c as d,t as o,k as V,b as v,f as m,u as l,n as u,h as w,O as x}from"./app-f1493ab2.js";import _e from"./Layout-fcdad30a.js";import{_ as xe}from"./EmbeddedSignupBtn-ac7efe60.js";import{_ as pe}from"./Modal-a0814fa2.js";import{_ as f}from"./FormInput-b3450213.js";import{_ as ye}from"./FormSelect-3a6ffebd.js";import"./index-114bea05.js";/* empty css              */import{_ as ke}from"./FormTextArea-95511fff.js";import"./index-764662c4.js";import"./App-45dbd9fa.js";import"./Sidebar-f2ddcf5a.js";import"./Menu-73c1148a.js";import"./ProfileModal-09ae28bb.js";import"./tabs-80627b62.js";import"./hidden-f79cef22.js";import"./micro-task-89dcd6af.js";import"./transition-f32a8133.js";import"./use-outside-click-92c6377f.js";import"./LangToggle-d2b58a25.js";import"./MobileSidebar-e6661e49.js";import"./pusher-a82d1614.js";import"./use-text-value-ecd8c541.js";const $e={class:"md:h-[90vh]"},Ae={class:"flex justify-center items-center mb-8"},Ve={class:"md:w-[60em]"},Ce={key:0,class:"bg-white border border-slate-200 rounded-lg py-2 text-sm mb-4"},Se={class:"flex items-center px-4 pt-2 pb-4"},Ze={class:"w-[70%]"},Me={class:"text-[17px]"},Ie={class:"flex items-center mt-1"},Be={class:"ml-auto"},Ee={key:1,class:"bg-white border border-slate-200 rounded-lg py-2 text-sm mb-4"},Ne={class:"grid grid-cols-4 items-center px-4 gap-x-4 py-2 border-b relative"},Te={class:"border-r"},Oe={class:"border-r"},Ue={class:"border-r"},Re={class:"bg-slate-50 py-1 px-2 rounded-md w-[fit-content] text-xs"},Pe={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"},je={class:"grid grid-cols-4 items-center px-4 gap-x-4 py-2"},Fe={class:"border-r"},De={key:0,class:"border-r"},We={class:"bg-slate-50 py-1 px-2 rounded-md w-[fit-content] text-xs"},Le={class:"border-r"},He={class:"bg-slate-50 py-1 px-2 rounded-md w-[fit-content] text-xs"},Ye={class:"bg-slate-50 py-1 px-2 rounded-md w-[fit-content] text-xs"},ze={class:"flex items-center justify-between px-4 pt-2 pb-4"},Ge={class:"text-[17px]"},qe={class:"flex items-center mt-1"},Je={class:"flex space-x-10 border-b w-full px-4 py-6"},Qe={class:"w-[40%]"},Ke={class:"text-slate-600"},Xe={class:"text-xs text-slate-700 flex items-center"},es={class:"w-[60%]"},ss={class:"flex space-x-10 border-b w-full px-4 py-6"},ts={class:"w-[40%]"},os={class:"text-slate-600"},as={class:"text-xs text-slate-700 flex items-center"},ls={class:"w-[60%]"},is={class:"flex space-x-10 border-b w-full px-4 py-6"},ns={class:"w-[40%]"},rs={class:"text-slate-600"},ds={class:"text-xs text-slate-700 flex items-center"},ps={class:"w-[60%]"},us={class:"flex space-x-10 w-full px-4 py-6"},ms={class:"w-[40%]"},vs={class:"text-slate-600"},cs={class:"text-xs text-slate-700 flex items-center"},hs={class:"w-[60%]"},fs={class:"flex px-4 pt-1 pb-2"},bs={class:"ml-auto"},ws=["disabled"],gs={key:0,xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24"},_s={key:1},xs={key:3,class:"bg-white border border-slate-200 rounded-lg py-2 text-sm mb-4"},ys={class:"px-4 pt-2 pb-4"},ks={class:"text-[17px]"},$s={class:"flex items-center mt-1"},As={class:"flex space-x-10 border-b w-full px-4 py-4"},Vs={class:"w-[40%]"},Cs={class:"text-slate-600"},Ss={class:"text-left w-[60%]"},Zs={class:"w-48 break-all"},Ms={class:"flex space-x-10 w-full px-4 py-4"},Is={class:"w-[40%]"},Bs={class:"text-slate-600"},Es={class:"text-left w-[60%]"},Ns={class:"text-left"},Ts={key:4,class:"bg-white border border-slate-200 rounded-lg py-2 text-sm mb-20"},Os={class:"flex items-center px-4 pt-2 pb-4"},Us={class:"w-[60%]"},Rs={class:"text-[17px]"},Ps={class:"flex items-center mt-1"},js={class:"w-[40%] ml-auto"},Fs={class:"mt-5 grid grid-cols-1 gap-x-6 gap-y-4"},Ds={class:"mt-4 flex"},Ws=["disabled"],Ls={key:0,xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24"},Hs={key:1},Ys={class:"mt-5 grid grid-cols-1 gap-x-6 gap-y-4"},zs={class:"mt-4 flex"},Gs=["disabled"],qs={key:0,xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24"},Js={key:1},_t={__name:"Whatsapp",props:["settings","embeddedSignupActive","appId","configId","graphAPIVersion","modules"],setup(C){var Z,M,I,B,E,N,T,O,U,R,P,j;const c=C;h(!1);const S=h(c.settings.metadata),ue=h(window.location.origin),g=h(!1),_=h(!1),t=h(S.value?JSON.parse(S.value):null),y=h(!1),r=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}),p=k({description:t.value&&t.value.whatsapp?(I=(M=(Z=t.value)==null?void 0:Z.whatsapp)==null?void 0:M.business_profile)==null?void 0:I.description:null,address:t.value&&t.value.whatsapp?(N=(E=(B=t.value)==null?void 0:B.whatsapp)==null?void 0:E.business_profile)==null?void 0:N.address:null,email:t.value&&t.value.whatsapp?(U=(O=(T=t.value)==null?void 0:T.whatsapp)==null?void 0:O.business_profile)==null?void 0:U.email:null,industry:t.value&&t.value.whatsapp?(j=(P=(R=t.value)==null?void 0:R.whatsapp)==null?void 0:P.business_profile)==null?void 0:j.industry:null,websites:[]}),b=k({access_token:t.value&&t.value.whatsapp?t.value.whatsapp.access_token:null}),me=[{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 ve(){g.value=!0}function ce(){_.value=!0}const he=()=>{r.post("/settings/whatsapp",{preserveScroll:!0,preserveState:!1,onSuccess:()=>{g.value=!1}})},fe=()=>{p.post("/settings/whatsapp/business-profile",{preserveScroll:!0})},be=()=>{b.post("/settings/whatsapp/token",{preserveScroll:!0,onSuccess:()=>{_.value=!1}})},we=()=>{y.value=!0,x.visit("/settings/whatsapp/refresh",{method:"get",preserveState:!0,onFinish:()=>{y.value=!1},onSuccess:()=>{x.visit("/settings/whatsapp",{preserveState:!1})}})},ge=()=>{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(a,s)=>(n(),$(_e,{modules:c.modules},{default:A(()=>{var F,D,W,L,H,Y,z,G,q,J,Q,K,X,ee,se,te,oe,ae,le,ie,ne,re,de;return[e("div",$e,[e("div",Ae,[e("div",Ve,[(F=t.value)!=null&&F.whatsapp?v("",!0):(n(),d("div",Ce,[e("div",Se,[e("div",Ze,[e("h2",Me,o(a.$t("Setup Whatsapp Account")),1),e("span",Ie,o(a.$t("Setup your integration to be able to receive and send messages via Whatsapp.")),1)]),e("div",Be,[C.embeddedSignupActive==1?(n(),$(xe,{key:0,appId:c.appId,configId:c.configId,graphAPIVersion:c.graphAPIVersion},null,8,["appId","configId","graphAPIVersion"])):(n(),d("button",{key:1,onClick:s[0]||(s[0]=i=>ve()),class:"bg-primary text-white p-2 rounded-lg text-sm mt-5 flex px-3 w-fit"},[V(o(a.$t("Setup whatsapp"))+" ",1),s[18]||(s[18]=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))]))])])])),(D=t.value)!=null&&D.whatsapp?(n(),d("div",Ee,[e("div",Ne,[e("div",Te,[e("div",null,o(a.$t("Display name")),1),e("div",null,o((W=t.value.whatsapp)==null?void 0:W.verified_name),1)]),e("div",Oe,[e("div",null,o(a.$t("Connected number")),1),e("div",null,o((L=t.value.whatsapp)==null?void 0:L.display_phone_number),1)]),e("div",Ue,[e("div",null,o(a.$t("Message limits")),1),e("div",null,o((H=t.value.whatsapp)!=null&&H.messaging_limit_tier?(Y=t.value.whatsapp)==null?void 0:Y.messaging_limit_tier:"N/A"),1)]),e("div",null,[e("div",null,o(a.$t("Number status")),1),e("div",Re,o((z=t.value.whatsapp)==null?void 0:z.number_status),1)]),y.value===!1?(n(),d("button",{key:0,onClick:s[1]||(s[1]=i=>we()),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[19]||(s[19]=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(a.$t("Refresh")),1)])):(n(),d("button",Pe,s[20]||(s[20]=[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",je,[e("div",Fe,[e("div",null,o(a.$t("Whatsapp business ac ID")),1),e("div",null,o((G=t.value.whatsapp)==null?void 0:G.waba_id),1)]),((q=t.value.whatsapp)==null?void 0:q.is_embedded_signup)==1?(n(),d("div",De,[e("div",null,o(a.$t("Phone verification status")),1),e("div",We,o((J=t.value.whatsapp)==null?void 0:J.code_verification_status),1)])):v("",!0),e("div",Le,[e("div",null,o(a.$t("Quality rating")),1),e("div",He,o((Q=t.value.whatsapp)==null?void 0:Q.quality_rating),1)]),e("div",null,[e("div",null,o(a.$t("Account status")),1),e("div",Ye,o((K=t.value.whatsapp)==null?void 0:K.account_review_status),1)])])])):v("",!0),(X=t.value)!=null&&X.whatsapp?(n(),d("form",{key:2,onSubmit:s[7]||(s[7]=w(i=>fe(),["prevent"])),class:"bg-white border border-slate-200 rounded-lg py-2 text-sm mb-4 pb-4"},[e("div",ze,[e("div",null,[e("h2",Ge,o(a.$t("Business profile settings")),1),e("span",qe,[s[21]||(s[21]=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(a.$t("Setup the Whatsapp business profile for your number")),1)])]),e("div",null,[(ee=t.value)!=null&&ee.whatsapp&&((te=(se=t.value)==null?void 0:se.whatsapp)==null?void 0:te.is_embedded_signup)===0?(n(),d("button",{key:0,type:"button",onClick:s[2]||(s[2]=i=>ce()),class:"bg-primary text-white p-2 rounded-lg text-sm mt-5 flex px-3 w-fit"},o(a.$t("Update token")),1)):v("",!0)])]),e("div",Je,[e("div",Qe,[e("span",Ke,o(a.$t("Business address")),1),e("div",Xe,[s[22]||(s[22]=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(a.$t("Specify your physical business address")),1)])]),e("div",es,[m(f,{modelValue:l(p).address,"onUpdate:modelValue":s[3]||(s[3]=i=>l(p).address=i),error:l(p).errors.address,name:"",type:"text",class:u("col-span-4")},null,8,["modelValue","error"])])]),e("div",ss,[e("div",ts,[e("span",os,o(a.$t("Business email")),1),e("div",as,[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(a.$t("Add your business email address")),1)])]),e("div",ls,[m(f,{modelValue:l(p).email,"onUpdate:modelValue":s[4]||(s[4]=i=>l(p).email=i),error:l(p).errors.email,name:"",type:"email",class:u("col-span-4")},null,8,["modelValue","error"])])]),e("div",is,[e("div",ns,[e("span",rs,o(a.$t("Business description")),1),e("div",ds,[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(a.$t("Edit your whatsapp business account description")),1)])]),e("div",ps,[m(ke,{modelValue:l(p).description,"onUpdate:modelValue":s[5]||(s[5]=i=>l(p).description=i),error:l(p).errors.description,name:"",type:"text",class:u("col-span-4")},null,8,["modelValue","error"])])]),e("div",us,[e("div",ms,[e("span",vs,o(a.$t("Business industry")),1),e("div",cs,[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(a.$t("Specify your business vertical")),1)])]),e("div",hs,[m(ye,{modelValue:l(p).industry,"onUpdate:modelValue":s[6]||(s[6]=i=>l(p).industry=i),name:"",type:"text",options:me,error:l(p).errors.industry,class:u("col-span-4")},null,8,["modelValue","error"])])]),e("div",fs,[e("div",bs,[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:l(p).processing},[l(p).processing?(n(),d("svg",gs,s[26]||(s[26]=[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)]))):(n(),d("span",_s,o(a.$t("Save")),1))],8,ws)])])],32)):v("",!0),(oe=t.value)!=null&&oe.whatsapp&&((le=(ae=t.value)==null?void 0:ae.whatsapp)==null?void 0:le.is_embedded_signup)===0?(n(),d("div",xs,[e("div",ys,[e("h2",ks,o(a.$t("Meta webhook settings")),1),e("span",$s,[s[27]||(s[27]=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(a.$t("Add these webhook settings to your facebook developer account")),1)])]),e("div",As,[e("div",Vs,[e("span",Cs,o(a.$t("Webhook url")),1)]),e("div",Ss,[e("span",Zs,o(ue.value+"/webhook/whatsapp/"+c.settings.identifier),1)])]),e("div",Ms,[e("div",Is,[e("span",Bs,o(a.$t("Verify token")),1)]),e("div",Es,[e("div",Ns,o(c.settings.identifier),1)])])])):v("",!0),(ie=t.value)!=null&&ie.whatsapp?(n(),d("div",Ts,[e("div",Os,[e("div",Us,[e("h2",Rs,o(a.$t("Remove Whatsapp account")),1),e("span",Ps,o(a.$t("This will completely delete your whatsapp integration. Your contacts & messages will be unaffected.")),1)]),e("div",js,[e("button",{onClick:s[8]||(s[8]=i=>ge()),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(a.$t("Delete integration")),1)])])])):v("",!0)])])]),m(pe,{label:a.$t("Whatsapp API config"),isOpen:g.value},{default:A(()=>[e("div",Fs,[e("form",{onSubmit:s[14]||(s[14]=w(i=>he(),["prevent"])),class:"grid gap-x-6 gap-y-4 sm:grid-cols-6"},[m(f,{modelValue:l(r).app_id,"onUpdate:modelValue":s[9]||(s[9]=i=>l(r).app_id=i),error:l(r).errors.app_id,name:a.$t("App ID"),type:"text",class:u("sm:col-span-6")},null,8,["modelValue","error","name"]),m(f,{modelValue:l(r).access_token,"onUpdate:modelValue":s[10]||(s[10]=i=>l(r).access_token=i),error:l(r).errors.access_token,name:a.$t("Access token"),type:"text",class:u("sm:col-span-6")},null,8,["modelValue","error","name"]),m(f,{modelValue:l(r).phone_number_id,"onUpdate:modelValue":s[11]||(s[11]=i=>l(r).phone_number_id=i),error:l(r).errors.phone_number_id,name:a.$t("Phone number ID"),type:"text",class:u("sm:col-span-6")},null,8,["modelValue","error","name"]),m(f,{modelValue:l(r).waba_id,"onUpdate:modelValue":s[12]||(s[12]=i=>l(r).waba_id=i),error:l(r).errors.waba_id,name:a.$t("Whatsapp business account ID"),type:"text",class:u("sm:col-span-6")},null,8,["modelValue","error","name"]),e("div",Ds,[e("button",{type:"button",onClick:s[13]||(s[13]=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(a.$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":l(r).processing}]),disabled:l(r).processing},[l(r).processing?(n(),d("svg",Ls,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)]))):(n(),d("span",Hs,o(a.$t("Save")),1))],10,Ws)])],32)])]),_:1},8,["label","isOpen"]),(ne=t.value)!=null&&ne.whatsapp&&((de=(re=t.value)==null?void 0:re.whatsapp)==null?void 0:de.is_embedded_signup)===0?(n(),$(pe,{key:0,label:a.$t("Whatsapp API config"),isOpen:_.value},{default:A(()=>[e("div",Ys,[e("form",{onSubmit:s[17]||(s[17]=w(i=>be(),["prevent"])),class:"grid gap-x-6 gap-y-4 sm:grid-cols-6"},[m(f,{modelValue:l(b).access_token,"onUpdate:modelValue":s[15]||(s[15]=i=>l(b).access_token=i),error:l(b).errors.access_token,name:a.$t("Access token"),type:"text",class:u("sm:col-span-6")},null,8,["modelValue","error","name"]),e("div",zs,[e("button",{type:"button",onClick:s[16]||(s[16]=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(a.$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":l(r).processing}]),disabled:l(b).processing},[l(b).processing?(n(),d("svg",qs,s[29]||(s[29]=[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)]))):(n(),d("span",Js,o(a.$t("Save")),1))],10,Gs)])],32)])]),_:1},8,["label","isOpen"])):v("",!0)]}),_:1},8,["modules"]))}};export{_t as default};