| Current Path : /home/users/unlimited/www/whatsapp-crm/public/build/assets/ |
| Current File : /home/users/unlimited/www/whatsapp-crm/public/build/assets/Whatsapp-13f883b0.js |
import{r as m,T as k,h as $,f as A,o as n,a as e,c as d,t,k as V,b as h,e as c,u as l,n as u,g as f,O as x}from"./app-43851608.js";import ge from"./Layout-5f40bc5f.js";import{_ as xe}from"./EmbeddedSignupBtn-9f4f400f.js";import{_ as pe}from"./Modal-22a49fae.js";import{_ as v}from"./FormInput-4a309017.js";import{_ as ye}from"./FormSelect-2d73589a.js";import"./index-99011d5f.js";/* empty css */import{_ as ke}from"./FormTextArea-a182534a.js";import"./index-17cd980e.js";import"./App-26099fac.js";import"./Sidebar-13bbdf6e.js";import"./Menu-7a7609fd.js";import"./ProfileModal-628e5b7c.js";import"./LangToggle-8d05b0dc.js";import"./MobileSidebar-64958b6d.js";import"./use-text-value-242aa4d7.js";import"./ChevronUpDownIcon-8859f144.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]"},Be={class:"flex items-center mt-1"},Ne={class:"ml-auto"},Ee=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),Te={key:1,class:"bg-white border border-slate-200 rounded-lg py-2 text-sm mb-4"},Ie={class:"grid grid-cols-4 items-center px-4 gap-x-4 py-2 border-b relative"},Oe={class:"border-r"},Ue={class:"border-r"},Re={class:"border-r"},je={class:"bg-slate-50 py-1 px-2 rounded-md w-[fit-content] text-xs"},Fe=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),De={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"},Pe=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),We=[Pe],Le={class:"grid grid-cols-4 items-center px-4 gap-x-4 py-2"},He={class:"border-r"},Ye={key:0,class:"border-r"},ze={class:"bg-slate-50 py-1 px-2 rounded-md w-[fit-content] text-xs"},Ge={class:"border-r"},qe={class:"bg-slate-50 py-1 px-2 rounded-md w-[fit-content] text-xs"},Je={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=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),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=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),is={class:"w-[60%]"},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=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),cs={class:"w-[60%]"},hs={class:"flex space-x-10 border-b w-full px-4 py-6"},ms={class:"w-[40%]"},vs={class:"text-slate-600"},_s={class:"text-xs text-slate-700 flex items-center"},bs=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),fs={class:"w-[60%]"},ws={class:"flex space-x-10 w-full px-4 py-6"},gs={class:"w-[40%]"},xs={class:"text-slate-600"},ys={class:"text-xs text-slate-700 flex items-center"},ks=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),$s={class:"w-[60%]"},As={class:"flex px-4 pt-1 pb-2"},Vs={class:"ml-auto"},Cs=["disabled"],Ss={key:0,xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24"},Zs=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),Ms=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),Bs=[Zs,Ms],Ns={key:1},Es={key:3,class:"bg-white border border-slate-200 rounded-lg py-2 text-sm mb-4"},Ts={class:"px-4 pt-2 pb-4"},Is={class:"text-[17px]"},Os={class:"flex items-center mt-1"},Us=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),Rs={class:"flex space-x-10 border-b w-full px-4 py-4"},js={class:"w-[40%]"},Fs={class:"text-slate-600"},Ds={class:"text-left w-[60%]"},Ps={class:"w-48 break-all"},Ws={class:"flex space-x-10 w-full px-4 py-4"},Ls={class:"w-[40%]"},Hs={class:"text-slate-600"},Ys={class:"text-left w-[60%]"},zs={class:"text-left"},Gs={key:4,class:"bg-white border border-slate-200 rounded-lg py-2 text-sm mb-20"},qs={class:"flex items-center px-4 pt-2 pb-4"},Js={class:"w-[60%]"},Qs={class:"text-[17px]"},Ks={class:"flex items-center mt-1"},Xs={class:"w-[40%] ml-auto"},et={class:"mt-5 grid grid-cols-1 gap-x-6 gap-y-4"},st={class:"mt-4 flex"},tt=["disabled"],ot={key:0,xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24"},at=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),lt=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),it=[at,lt],nt={key:1},rt={class:"mt-5 grid grid-cols-1 gap-x-6 gap-y-4"},dt={class:"mt-4 flex"},pt=["disabled"],ut={key:0,xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24"},ct=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),ht=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),mt=[ct,ht],vt={key:1},Tt={__name:"Whatsapp",props:{settings:Object,embeddedSignupActive:Number,appId:String,configId:String},setup(C){var Z,M,B,N,E,T,I,O,U,R,j,F;const b=C;m(!1);const S=m(b.settings.metadata),ue=m(window.location.origin),w=m(!1),g=m(!1),s=m(S.value?JSON.parse(S.value):null),y=m(!1),r=k({app_id:s.value&&s.value.whatsapp?s.value.whatsapp.app_id:null,access_token:s.value&&s.value.whatsapp?s.value.whatsapp.access_token:null,phone_number_id:s.value&&s.value.whatsapp?s.value.whatsapp.phone_number_id:null,waba_id:s.value&&s.value.whatsapp?s.value.whatsapp.waba_id:null}),p=k({description:s.value&&s.value.whatsapp?(B=(M=(Z=s.value)==null?void 0:Z.whatsapp)==null?void 0:M.business_profile)==null?void 0:B.description:null,address:s.value&&s.value.whatsapp?(T=(E=(N=s.value)==null?void 0:N.whatsapp)==null?void 0:E.business_profile)==null?void 0:T.address:null,email:s.value&&s.value.whatsapp?(U=(O=(I=s.value)==null?void 0:I.whatsapp)==null?void 0:O.business_profile)==null?void 0:U.email:null,industry:s.value&&s.value.whatsapp?(F=(j=(R=s.value)==null?void 0:R.whatsapp)==null?void 0:j.business_profile)==null?void 0:F.industry:null,websites:[]}),_=k({access_token:s.value&&s.value.whatsapp?s.value.whatsapp.access_token:null}),ce=[{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 he(){w.value=!0}function me(){g.value=!0}const ve=()=>{r.post("/settings/whatsapp",{preserveScroll:!0,preserveState:!1,onSuccess:()=>{w.value=!1}})},_e=()=>{p.post("/settings/whatsapp/business-profile",{preserveScroll:!0})},be=()=>{_.post("/settings/whatsapp/token",{preserveScroll:!0,onSuccess:()=>{g.value=!1}})},fe=()=>{y.value=!0,x.visit("/settings/whatsapp/refresh",{method:"get",preserveState:!0,onFinish:()=>{y.value=!1},onSuccess:()=>{x.visit("/settings/whatsapp",{preserveState:!1})}})},we=()=>{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(o,a)=>(n(),$(ge,null,{default:A(()=>{var D,P,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,[(D=s.value)!=null&&D.whatsapp?h("",!0):(n(),d("div",Ce,[e("div",Se,[e("div",Ze,[e("h2",Me,t(o.$t("Setup Whatsapp Account")),1),e("span",Be,t(o.$t("Setup your integration to be able to receive and send messages via Whatsapp.")),1)]),e("div",Ne,[C.embeddedSignupActive==1?(n(),$(xe,{key:0,appId:b.appId,configId:b.configId},null,8,["appId","configId"])):(n(),d("button",{key:1,onClick:a[0]||(a[0]=i=>he()),class:"bg-primary text-white p-2 rounded-lg text-sm mt-5 flex px-3 w-fit"},[V(t(o.$t("Setup whatsapp"))+" ",1),Ee]))])])])),(P=s.value)!=null&&P.whatsapp?(n(),d("div",Te,[e("div",Ie,[e("div",Oe,[e("div",null,t(o.$t("Display name")),1),e("div",null,t((W=s.value.whatsapp)==null?void 0:W.verified_name),1)]),e("div",Ue,[e("div",null,t(o.$t("Connected number")),1),e("div",null,t((L=s.value.whatsapp)==null?void 0:L.display_phone_number),1)]),e("div",Re,[e("div",null,t(o.$t("Message limits")),1),e("div",null,t((H=s.value.whatsapp)!=null&&H.messaging_limit_tier?(Y=s.value.whatsapp)==null?void 0:Y.messaging_limit_tier:"N/A"),1)]),e("div",null,[e("div",null,t(o.$t("Number status")),1),e("div",je,t((z=s.value.whatsapp)==null?void 0:z.number_status),1)]),y.value===!1?(n(),d("button",{key:0,onClick:a[1]||(a[1]=i=>fe()),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"},[Fe,e("span",null,t(o.$t("Refresh")),1)])):(n(),d("button",De,We))]),e("div",Le,[e("div",He,[e("div",null,t(o.$t("Whatsapp business ac ID")),1),e("div",null,t((G=s.value.whatsapp)==null?void 0:G.waba_id),1)]),((q=s.value.whatsapp)==null?void 0:q.is_embedded_signup)==1?(n(),d("div",Ye,[e("div",null,t(o.$t("Phone verification status")),1),e("div",ze,t((J=s.value.whatsapp)==null?void 0:J.code_verification_status),1)])):h("",!0),e("div",Ge,[e("div",null,t(o.$t("Quality rating")),1),e("div",qe,t((Q=s.value.whatsapp)==null?void 0:Q.quality_rating),1)]),e("div",null,[e("div",null,t(o.$t("Account status")),1),e("div",Je,t((K=s.value.whatsapp)==null?void 0:K.account_review_status),1)])])])):h("",!0),(X=s.value)!=null&&X.whatsapp?(n(),d("form",{key:2,onSubmit:a[7]||(a[7]=f(i=>_e(),["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,t(o.$t("Business profile settings")),1),e("span",Xe,[es,V(" "+t(o.$t("Setup the Whatsapp business profile for your number")),1)])]),e("div",null,[(ee=s.value)!=null&&ee.whatsapp&&((te=(se=s.value)==null?void 0:se.whatsapp)==null?void 0:te.is_embedded_signup)===0?(n(),d("button",{key:0,type:"button",onClick:a[2]||(a[2]=i=>me()),class:"bg-primary text-white p-2 rounded-lg text-sm mt-5 flex px-3 w-fit"},t(o.$t("Update token")),1)):h("",!0)])]),e("div",ss,[e("div",ts,[e("span",os,t(o.$t("Business address")),1),e("div",as,[ls,e("span",null,t(o.$t("Specify your physical business address")),1)])]),e("div",is,[c(v,{modelValue:l(p).address,"onUpdate:modelValue":a[3]||(a[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",ns,[e("div",rs,[e("span",ds,t(o.$t("Business email")),1),e("div",ps,[us,e("span",null,t(o.$t("Add your business email address")),1)])]),e("div",cs,[c(v,{modelValue:l(p).email,"onUpdate:modelValue":a[4]||(a[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",hs,[e("div",ms,[e("span",vs,t(o.$t("Business description")),1),e("div",_s,[bs,e("span",null,t(o.$t("Edit your whatsapp business account description")),1)])]),e("div",fs,[c(ke,{modelValue:l(p).description,"onUpdate:modelValue":a[5]||(a[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",ws,[e("div",gs,[e("span",xs,t(o.$t("Business industry")),1),e("div",ys,[ks,e("span",null,t(o.$t("Specify your business vertical")),1)])]),e("div",$s,[c(ye,{modelValue:l(p).industry,"onUpdate:modelValue":a[6]||(a[6]=i=>l(p).industry=i),name:"",type:"text",options:ce,error:l(p).errors.industry,class:u("col-span-4")},null,8,["modelValue","error"])])]),e("div",As,[e("div",Vs,[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",Ss,Bs)):(n(),d("span",Ns,t(o.$t("Save")),1))],8,Cs)])])],32)):h("",!0),(oe=s.value)!=null&&oe.whatsapp&&((le=(ae=s.value)==null?void 0:ae.whatsapp)==null?void 0:le.is_embedded_signup)===0?(n(),d("div",Es,[e("div",Ts,[e("h2",Is,t(o.$t("Meta webhook settings")),1),e("span",Os,[Us,V(" "+t(o.$t("Add these webhook settings to your facebook developer account")),1)])]),e("div",Rs,[e("div",js,[e("span",Fs,t(o.$t("Webhook url")),1)]),e("div",Ds,[e("span",Ps,t(ue.value+"/webhook/whatsapp/"+b.settings.identifier),1)])]),e("div",Ws,[e("div",Ls,[e("span",Hs,t(o.$t("Verify token")),1)]),e("div",Ys,[e("div",zs,t(b.settings.identifier),1)])])])):h("",!0),(ie=s.value)!=null&&ie.whatsapp?(n(),d("div",Gs,[e("div",qs,[e("div",Js,[e("h2",Qs,t(o.$t("Remove Whatsapp account")),1),e("span",Ks,t(o.$t("This will completely delete your whatsapp integration. Your contacts & messages will be unaffected.")),1)]),e("div",Xs,[e("button",{onClick:a[8]||(a[8]=i=>we()),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"},t(o.$t("Delete integration")),1)])])])):h("",!0)])])]),c(pe,{label:o.$t("Whatsapp API config"),isOpen:w.value},{default:A(()=>[e("div",et,[e("form",{onSubmit:a[14]||(a[14]=f(i=>ve(),["prevent"])),class:"grid gap-x-6 gap-y-4 sm:grid-cols-6"},[c(v,{modelValue:l(r).app_id,"onUpdate:modelValue":a[9]||(a[9]=i=>l(r).app_id=i),error:l(r).errors.app_id,name:o.$t("App ID"),type:"text",class:u("sm:col-span-6")},null,8,["modelValue","error","name"]),c(v,{modelValue:l(r).access_token,"onUpdate:modelValue":a[10]||(a[10]=i=>l(r).access_token=i),error:l(r).errors.access_token,name:o.$t("Access token"),type:"text",class:u("sm:col-span-6")},null,8,["modelValue","error","name"]),c(v,{modelValue:l(r).phone_number_id,"onUpdate:modelValue":a[11]||(a[11]=i=>l(r).phone_number_id=i),error:l(r).errors.phone_number_id,name:o.$t("Phone number ID"),type:"text",class:u("sm:col-span-6")},null,8,["modelValue","error","name"]),c(v,{modelValue:l(r).waba_id,"onUpdate:modelValue":a[12]||(a[12]=i=>l(r).waba_id=i),error:l(r).errors.waba_id,name:o.$t("Whatsapp business account ID"),type:"text",class:u("sm:col-span-6")},null,8,["modelValue","error","name"]),e("div",st,[e("button",{type:"button",onClick:a[13]||(a[13]=f(i=>w.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"},t(o.$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",ot,it)):(n(),d("span",nt,t(o.$t("Save")),1))],10,tt)])],32)])]),_:1},8,["label","isOpen"]),(ne=s.value)!=null&&ne.whatsapp&&((de=(re=s.value)==null?void 0:re.whatsapp)==null?void 0:de.is_embedded_signup)===0?(n(),$(pe,{key:0,label:o.$t("Whatsapp API config"),isOpen:g.value},{default:A(()=>[e("div",rt,[e("form",{onSubmit:a[17]||(a[17]=f(i=>be(),["prevent"])),class:"grid gap-x-6 gap-y-4 sm:grid-cols-6"},[c(v,{modelValue:l(_).access_token,"onUpdate:modelValue":a[15]||(a[15]=i=>l(_).access_token=i),error:l(_).errors.access_token,name:o.$t("Access token"),type:"text",class:u("sm:col-span-6")},null,8,["modelValue","error","name"]),e("div",dt,[e("button",{type:"button",onClick:a[16]||(a[16]=f(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"},t(o.$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(_).processing},[l(_).processing?(n(),d("svg",ut,mt)):(n(),d("span",vt,t(o.$t("Save")),1))],10,pt)])],32)])]),_:1},8,["label","isOpen"])):h("",!0)]}),_:1}))}};export{Tt as default};