File: /home/dmstechonline/whatsapp.dmstech.online/public/build/assets/Edit-9b35d102.js
import{r as p,m as ce,G as he,f as _,g as N,o as n,a as e,t as a,j as c,h as y,u as ve,i as fe,n as d,c as i,a2 as ge,k as xe,b as r,F as T,e as A,w as B,s as F,v as ye,x as be,O as _e}from"./app-884e4ce3.js";import{_ as we}from"./App-faae56c7.js";import{_ as Ce,a as ke}from"./HeaderTextArea-096aae70.js";import{_ as g}from"./FormInput-ab713954.js";import{_ as Z}from"./FormSelect-1f27a419.js";import{_ as Ve}from"./FormTextArea-3daa517d.js";import{_ as $e}from"./FormToggleSwitch-5613ae6f.js";import{_ as Te}from"./Modal-a947e544.js";/* empty css */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"./index-d349a931.js";import"./use-text-value-48384026.js";import"./index-ff0eb693.js";import"./MobileSidebar-4319591b.js";import"./pusher-e63f75b9.js";import"./useRtl-295d8c04.js";const Ae={class:"px-4 md:px-0 flex flex-col bg-white border-l py-4 text-[#000] md:overflow-y-hidden"},Ue={class:"flex justify-between md:px-8 border-b pb-4"},Ee={class:"text-xl mb-1"},Le={class:"flex items-center text-sm leading-6 text-gray-600"},Oe={class:"ml-1 mt-1"},Me={class:"space-x-2 flex items-center"},Ie=["disabled"],Ne={key:0},Be={key:1,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Ze={class:"md:flex md:flex-grow-1"},He={class:"md:w-[50%] py-4 md:p-8 overflow-y-auto md:h-[90vh]"},je={class:"grid gap-x-6 gap-y-4 sm:grid-cols-6 mb-8"},De={class:"sm:col-span-6"},Re={class:"flex items-center gap-x-1 text-[11px] text-red-800 mt-1"},Pe={class:"sm:col-span-3"},Ye={class:"sm:col-span-3"},ze={class:"flex items-center gap-x-1 text-[11px] text-red-800 mt-1"},Se={key:0},Fe={class:"text-slate-600"},Ge={class:"text-xs"},Ke={class:"text-slate-600 text-xs"},Xe={class:"grid grid-cols-4 mt-2 bg-[#f9f9fa] rounded-lg mb-4"},Je={class:"mb-8"},qe={key:0},We={key:1},Qe={class:"flex justify-center px-6 pt-5 pb-6 border-2 border-gray-300 border-dashed rounded-md"},et={class:"text-center"},tt={key:0,class:"flex justify-center items-center"},st={class:"flex justify-center items-center space-x-3 py-1 border bg-slate-100 rounded-lg mb-2 w-fit px-2"},lt={class:"flex items-center space-x-2"},ot={class:"text-sm"},at={key:1,for:"file-upload"},nt={class:"flex text-sm text-gray-600"},it={for:"file-upload",class:"relative cursor-pointer bg-white rounded-md font-medium hover:text-indigo-500 focus-within:outline-none focus-within:ring-2 focus-within:ring-offset-2 focus-within:ring-indigo-500"},rt={class:"text-xs text-gray-500"},dt={key:2},ut={class:"flex justify-center px-6 pt-5 pb-6 border-2 border-gray-300 border-dashed rounded-md"},pt={class:"text-center"},mt={key:0,class:"flex justify-center items-center"},ct={class:"flex justify-center items-center space-x-3 py-1 border bg-slate-100 rounded-lg mb-2 w-fit px-2"},ht={class:"flex items-center space-x-2"},vt={class:"text-sm"},ft={key:1,for:"file-upload2"},gt={class:"flex text-sm text-gray-600"},xt={for:"file-upload2",class:"relative cursor-pointer bg-white rounded-md font-medium hover:text-indigo-500 focus-within:outline-none focus-within:ring-2 focus-within:ring-offset-2 focus-within:ring-indigo-500"},yt={class:"text-xs text-gray-500"},bt={key:3},_t={class:"flex justify-center px-6 pt-5 pb-6 border-2 border-gray-300 border-dashed rounded-md"},wt={class:"text-center"},Ct={key:0,class:"flex justify-center items-center"},kt={class:"flex justify-center items-center space-x-3 py-1 border bg-slate-100 rounded-lg mb-2 w-fit px-2"},Vt={class:"flex items-center space-x-2"},$t={class:"text-sm"},Tt={key:1,for:"file-upload3"},At={class:"flex text-sm text-gray-600"},Ut={for:"file-upload3",class:"relative cursor-pointer bg-white rounded-md font-medium hover:text-indigo-500 focus-within:outline-none focus-within:ring-2 focus-within:ring-offset-2 focus-within:ring-indigo-500"},Et={class:"text-xs text-gray-500"},Lt={class:"text-slate-600"},Ot={class:"text-xs"},Mt={class:"text-slate-600 text-xs"},It={class:"mb-8"},Nt={class:"text-slate-600 capitalize"},Bt={class:"text-xs"},Zt={class:"text-slate-600 text-xs"},Ht={class:"mb-8"},jt={class:"text-xs"},Dt={class:"text-slate-600"},Rt={class:"text-xs"},Pt={class:"text-slate-600 text-xs"},Yt={class:"grid grid-cols-2 mt-3 mb-2"},zt={class:"grid grid-cols-2 mt-3 mb-2"},St={key:0,class:"mt-3 mb-8"},Ft={class:"flex items-center justify-between pb-1"},Gt={class:"text-sm"},Kt=["onClick"],Xt={class:"flex space-x-1 border-t pt-2"},Jt={key:1},qt={class:"mt-4 bg-gray-50 rounded-md p-3"},Wt={class:"text-slate-600"},Qt={class:"text-slate-600 text-xs"},es={class:"mt-4"},ts={class:"flex h-6 items-center mr-2"},ss={class:"flex items-center cursor-pointer"},ls=["checked","onChange"],os={class:"w-5 h-5 rounded-full border-2 border-gray-400 flex items-center justify-center transition"},as={key:0,class:"w-2.5 h-2.5 rounded-full bg-primary transition"},ns=["onClick"],is={class:"text-gray-900 cursor-pointer"},rs={class:"text-[11px] leading-tight text-gray-500"},ds={key:0,class:"mt-6 bg-gray-50 rounded-md p-3"},us={class:"text-slate-600"},ps={class:"text-slate-600 leading-tight text-xs mb-4"},ms={class:"flex gap-x-2 rounded-lg mb-3"},cs=["onClick"],hs={class:"bg-slate-200 text-[11px] p-3 rounded-md leading-tight mb-4 text-gray-500"},vs={class:"mt-6 bg-gray-50 rounded-md p-3"},fs={class:"text-slate-600"},gs={class:"text-slate-600 leading-tight text-xs"},xs={class:"mt-4"},ys={class:"relative flex mb-2"},bs={class:"flex h-6 items-center mr-2"},_s=["for"],ws={class:"relative flex mb-2"},Cs={class:"flex h-6 items-center mr-2"},ks=["for"],Vs={class:"text-[11px] text-slate-600"},$s={key:0,class:"relative flex mb-2"},Ts={class:"bg-white border rounded-md w-full p-2"},As={class:"mb-2"},Us={class:"w-1/3 flex items-center gap-x-2"},Es={class:"text-sm"},Ls={class:"mt-6 bg-gray-50 rounded-md p-3"},Os={class:"text-slate-600 mb-1"},Ms={class:"text-slate-600 leading-tight text-xs mb-4"},Is={key:0},Ns={key:1,class:"flex gap-x-2"},Bs={key:2,class:"mt-6 bg-gray-50 rounded-md p-3"},Zs={class:"text-slate-600 mb-1"},Hs={class:"text-slate-600 leading-tight text-xs"},js={class:"mt-4"},Ds={class:"text-slate-600 mb-1"},Rs={class:"flex w-full mb-4"},Ps={class:"w-3/4 text-slate-600 text-[11px]"},Ys={class:"w-1/4"},zs={class:"md:w-[50%] py-20 px-20 overflow-y-auto",style:{"background-image":"url('/images/whatsapp-bg-02.png')"}},Ss={class:"mr-auto rounded-lg rounded-tl-none my-1 p-1 text-sm bg-white flex flex-col relative speech-bubble-left w-[25em]"},Fs={key:0,class:"mb-4 bg-[#ccd0d5] flex justify-center py-8 rounded"},Gs={key:0,src:"/images/image-placeholder.png"},Ks={key:1,src:"/images/video-placeholder.png"},Xs={key:2,src:"/images/document-placeholder.png"},Js={key:1,class:"text-gray-700 text-[16px] mb-1 px-2"},qs=["innerHTML"],Ws=["innerHTML"],Qs={class:"text-[#8c8c8c] mt-1 px-2"},el={key:0,class:"text-[13px]"},tl={key:1},sl={key:0,class:"mr-auto text-sm text-[#00a5f4] flex flex-col relative max-w-[25em]"},ll={class:"flex justify-center items-center space-x-2 rounded-lg bg-white h-10 my-[0.1em]"},ol={key:0,class:"flex gap-x-1"},al={key:1},nl={key:1,class:"mr-auto text-sm text-[#00a5f4] flex flex-col relative max-w-[25em]"},il={key:0,xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 24 24"},rl={key:1,xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 24 24"},dl={key:2,src:"/images/icons/link.png",class:"h-4"},ul={key:3,src:"/images/icons/reply.png",class:"h-4"},pl={class:"mt-5 grid grid-cols-1 gap-x-6 gap-y-4"},ml={class:"text-center"},cl={key:0,class:"bg-[#fae6e6] text-[darkred] rounded text-sm p-2 mb-4"},hl={key:1},vl={class:"text-xl"},zl={__name:"Edit",props:["languages","template"],setup(G){var P,Y,z;const b=G,K=p("60"),H=p("0"),X=p("1098"),j=p("0"),D=p("60"),U=p("0"),k=p(!1),J=p(null),E=p(!1),w=p(null),R=p(JSON.parse(b.template.metadata)),f=(l,s,u=!1)=>{const h=R.value.components.find(x=>x.type===l);if(!h)return null;if(u&&h.buttons&&h.buttons.length>0){const x=h.buttons[0];return x.hasOwnProperty(s)?x[s]:null}return h.hasOwnProperty(s)?h[s]:null},L=l=>{const s=R.value.components.find(x=>x.type==="BUTTONS");if(!s||!s.buttons||s.buttons.length===0)return null;const u=s.buttons[0];return u.url&&new URLSearchParams(new URL(u.url).search).get(l)||null},t=p({name:b.template.name,category:b.template.category,language:b.template.language,message_send_ttl_seconds:null,customize_ttl:!1,header:{format:f("HEADER","format")??"TEXT",text:f("HEADER","text"),example:(P=f("HEADER","example"))==null?void 0:P.header_text},body:{text:f("BODY","text"),variables:null,add_security_recommendation:f("BODY","add_security_recommendation"),example:(z=(Y=f("BODY","example"))==null?void 0:Y.body_text)==null?void 0:z[0]},footer:{text:f("FOOTER","text"),code_expiration_minutes:f("FOOTER","code_expiration_minutes")},code_expiration:!!f("FOOTER","code_expiration_minutes"),set_custom_validity_period:!1,buttons:f("BUTTONS","buttons"),authentication_button:{type:"OTP",otp_type:L("otp_type")?L("otp_type").toLowerCase():null,text:f("BUTTONS","text",!0),autofill_text:L("cta_display_name"),zero_tap_terms_accepted:!0,supported_apps:[{package_name:null,signature_hash:null}]}});p("text");const q=p(b.languages),W=p([{value:"UTILITY",label:"Utility"},{value:"MARKETING",label:"Marketing"},{value:"AUTHENTICATION",label:"Authentication"}]),C=p({}),V=l=>{const s=t.value.header.format;(!(s in C.value)||JSON.stringify(C.value[s])!==JSON.stringify(t.value.header.example))&&(C.value[s]=t.value.header.example),t.value.header.format=l,C.value[l]!==void 0?t.value.header.example=C.value[l]:t.value.header.example=null},Q=l=>{const s=l.target.value.toLowerCase();t.value.name=s.replace(/[^a-zA-Z0-9_]/g,"")},O=l=>{const s=l.target.files[0],u=new FileReader;u.onload=h=>{J.value=h.target.result,t.value.header.example=s},u.readAsDataURL(s)},M=()=>{t.value.header.example=""},ee=l=>{l.preventDefault(),t.value.name+="_"},te=l=>{let s=0,u=0;switch(l){case"header":s=K.value,u=t.value.header.text.length,u<=s?H.value=u:(t.value.header.text=t.value.header.text.slice(0,s),H.value=s);break;case"body":s=X.value,u=t.value.body.text.length,u<=s?j.value=u:(t.value.body.text=t.value.body.text.slice(0,s),j.value=s);break;case"footer":s=D.value,u=t.value.footer.text.length,u<=s?U.value=u:(t.value.footer.text=t.value.footer.text.slice(0,s),U.value=s);break}},$=l=>{l==="call"?t.value.buttons.push({type:"PHONE_NUMBER",country:null,text:null,phone_number:null}):l==="website"?t.value.buttons.push({type:"URL",text:null,url:null}):l==="custom"?t.value.buttons.push({type:"QUICK_REPLY",text:null}):l==="offer"&&t.value.buttons.push({type:"COPY_CODE",example:null})},se=()=>{t.value.authentication_button.supported_apps.length<5&&t.value.authentication_button.supported_apps.push({package_name:null,signature_hash:null})},le=l=>{t.value.authentication_button.supported_apps.splice(l,1)},oe=l=>{l>=0&&l<t.value.buttons.length&&t.value.buttons.splice(l,1)},I=ce(()=>t.value.name===null||t.value.name.trim()===""||t.value.language===null||t.value.language.trim()===""||t.value.category===null||t.value.category.trim()===""||Array.isArray(t.value.buttons)&&t.value.buttons.some(l=>l.name===null||l.name===""||l.type===null||l.type===""||l.country===null||l.country===""||l.text===null||l.text===""||l.phone_number===null||l.phone_number==="")?!1:!(t.value.body.text===null||t.value.body.text.trim()==="")),ae=()=>{k.value=!0,E.value=!0,be.post("/templates/"+b.template.uuid,t.value,{headers:{"Content-Type":"multipart/form-data"}}).then(l=>{l.data.success===!1?(k.value=!1,w.value=l.data.data.error.message):_e.visit("/templates",{method:"get"})}).catch(l=>{})},ne=[{value:"zero_tap",label:"Zero-tap auto-fill",description:"This is recommended as the easiest option for your customers. Zero-tap will automatically send code without requiring your customer to tap a button. An auto-fill or copy code message will be sent if zero-tap and auto-fill aren’t possible."},{value:"one_tap",label:"One-tap auto-fill",description:"The code sends to your app when customers tap the button. A copy code message will be sent if auto-fill isn’t possible."},{value:"copy_code",label:"Copy code",description:"Basic authentication with quick setup. Your customers copy and paste the code into your app."}],ie=p([{value:"30",label:"30 seconds"},{value:"60",label:"1 minute"},{value:"120",label:"2 minutes"},{value:"180",label:"3 minutes"},{value:"300",label:"5 minutes"},{value:"600",label:"10 minutes"},{value:"800",label:"15 minutes"}]),re=p([{value:"30",label:"30 seconds"},{value:"60",label:"1 minute"},{value:"120",label:"2 minutes"},{value:"300",label:"5 minutes"},{value:"600",label:"10 minutes"},{value:"800",label:"15 minutes"},{value:"1600",label:"30 minutes"},{value:"3200",label:"1 hour"},{value:"9600",label:"3 hours"},{value:"19200",label:"6 hours"},{value:"38400",label:"12 hours"}]),de=l=>{t.value.header.example=l},ue=l=>{t.value.body.example=l};function pe(l){return l.toLowerCase().replace(/_/g," ").replace(/^\w/,s=>s.toUpperCase())}const me=()=>{E.value=!1,setTimeout(()=>{w.value=null},500)};return he(t,()=>{I.value}),(l,s)=>(n(),_(we,null,{default:N(()=>{var u,h,x,S;return[e("div",Ae,[e("div",Ue,[e("div",null,[e("h2",Ee,a(l.$t("Edit template")),1),e("p",Le,[s[33]||(s[33]=e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",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",Oe,a(l.$t("Modify whatsapp template")),1)])]),e("div",Me,[c(ve(fe),{href:"/templates",class:"rounded-md bg-black px-3 py-2 text-sm text-white shadow-sm hover:bg-indigo-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600"},{default:N(()=>[y(a(l.$t("Back")),1)]),_:1}),e("button",{onClick:s[0]||(s[0]=o=>ae()),type:"button",class:d(["rounded-md px-3 py-2 float-right text-sm text-white focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600 capitalize",I.value===!0?"bg-indigo-600 hover:bg-indigo-500 shadow-sm":"bg-gray-200"]),disabled:!I.value||k.value},[k.value?(n(),i("svg",Be,s[34]||(s[34]=[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(),i("span",Ne,a(l.$t("Update template")),1))],10,Ie)])]),e("div",Ze,[e("div",He,[e("div",je,[e("div",De,[c(g,{modelValue:t.value.name,"onUpdate:modelValue":s[1]||(s[1]=o=>t.value.name=o),name:l.$t("Name"),disabled:!0,type:"text",onInput:Q,onKeydown:ge(xe(ee,["prevent"]),["space"]),class:d("")},null,8,["modelValue","name","onKeydown"]),e("span",Re,[s[35]||(s[35]=e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24"},[e("path",{fill:"none",stroke:"#991b1b","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3"})],-1)),y(" "+a(l.$t("You are not allowed to edit this field")),1)])]),e("div",Pe,[c(Z,{modelValue:t.value.category,"onUpdate:modelValue":s[2]||(s[2]=o=>t.value.category=o),options:W.value,name:l.$t("Category"),class:d("sm:col-span-3"),placeholder:"Select Category"},null,8,["modelValue","options","name"])]),e("div",Ye,[c(Z,{modelValue:t.value.language,"onUpdate:modelValue":s[3]||(s[3]=o=>t.value.language=o),disabled:!0,options:q.value,name:l.$t("Language"),class:d("sm:col-span-3"),placeholder:"Select Language"},null,8,["modelValue","options","name"]),e("span",ze,[s[36]||(s[36]=e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24"},[e("path",{fill:"none",stroke:"#991b1b","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3"})],-1)),y(" "+a(l.$t("You are not allowed to edit this field")),1)])])]),t.value.category==="UTILITY"||t.value.category==="MARKETING"?(n(),i("div",Se,[e("h2",Fe,[y(a(l.$t("Header"))+" ",1),e("span",Ge,"("+a(l.$t("Optional"))+")",1)]),e("span",Ke,a(l.$t("Add a title or choose which type of media you'll use for this header")),1),e("div",Xe,[e("button",{onClick:s[4]||(s[4]=o=>V("TEXT")),class:d(["text-center py-2 text-sm text-slate-800 m-1",t.value.header.format==="TEXT"?"bg-white shadow rounded-lg":""])},a(l.$t("Text")),3),e("button",{onClick:s[5]||(s[5]=o=>V("IMAGE")),class:d(["text-center py-2 text-sm text-slate-800 m-1",t.value.header.format==="IMAGE"?"bg-white shadow rounded-lg":""])},a(l.$t("Image")),3),e("button",{onClick:s[6]||(s[6]=o=>V("VIDEO")),class:d(["text-center py-2 text-sm text-slate-800 m-1",t.value.header.format==="VIDEO"?"bg-white shadow rounded-lg":""])},a(l.$t("Video")),3),e("button",{onClick:s[7]||(s[7]=o=>V("DOCUMENT")),class:d(["text-center py-2 text-sm text-slate-800 m-1",t.value.header.format==="DOCUMENT"?"bg-white shadow rounded-lg":""])},a(l.$t("Document")),3)]),e("div",Je,[t.value.header.format==="TEXT"?(n(),i("div",qe,[c(Ce,{modelValue:t.value.header.text,"onUpdate:modelValue":s[8]||(s[8]=o=>t.value.header.text=o),customValues:t.value.header.example,onUpdateExamples:de},null,8,["modelValue","customValues"])])):r("",!0),t.value.header.format==="IMAGE"?(n(),i("div",We,[e("div",Qe,[e("input",{type:"file",class:"sr-only",accept:".jpg, .png",ref:"fileInput",id:"file-upload",onChange:s[9]||(s[9]=o=>O(o))},null,544),e("div",et,[e("div",null,[t.value.header.format==="IMAGE"&&t.value.header.example?(n(),i("div",tt,[e("div",st,[s[38]||(s[38]=e("div",null,[e("svg",{class:"mx-auto h-6 w-6 text-gray-400 cursor-pointer",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},[e("path",{fill:"currentColor",d:"M14 9a1.5 1.5 0 1 1 3 0a1.5 1.5 0 0 1-3 0Z"}),e("path",{fill:"currentColor","fill-rule":"evenodd",d:"M7.268 4.658a54.647 54.647 0 0 1 9.465 0l1.51.132a3.138 3.138 0 0 1 2.831 2.66a30.604 30.604 0 0 1 0 9.1a3.138 3.138 0 0 1-2.831 2.66l-1.51.131c-3.15.274-6.316.274-9.465 0l-1.51-.131a3.138 3.138 0 0 1-2.832-2.66a30.601 30.601 0 0 1 0-9.1a3.138 3.138 0 0 1 2.831-2.66l1.51-.132Zm9.335 1.495a53.147 53.147 0 0 0-9.206 0l-1.51.131A1.638 1.638 0 0 0 4.41 7.672a29.101 29.101 0 0 0-.311 5.17L7.97 8.97a.75.75 0 0 1 1.09.032l3.672 4.13l2.53-.844a.75.75 0 0 1 .796.21l3.519 3.91a29.101 29.101 0 0 0 .014-8.736a1.638 1.638 0 0 0-1.478-1.388l-1.51-.131Zm2.017 11.435l-3.349-3.721l-2.534.844a.75.75 0 0 1-.798-.213l-3.471-3.905l-4.244 4.243c.049.498.11.996.185 1.491a1.638 1.638 0 0 0 1.478 1.389l1.51.131c3.063.266 6.143.266 9.206 0l1.51-.131c.178-.016.35-.06.507-.128Z","clip-rule":"evenodd"})])],-1)),e("div",lt,[e("span",ot,a(t.value.header.example.name),1),e("button",{onClick:s[10]||(s[10]=o=>M())},s[37]||(s[37]=[e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},[e("path",{fill:"currentColor","fill-rule":"evenodd",d:"M17.707 7.707a1 1 0 0 0-1.414-1.414L12 10.586L7.707 6.293a1 1 0 0 0-1.414 1.414L10.586 12l-4.293 4.293a1 1 0 1 0 1.414 1.414L12 13.414l4.293 4.293a1 1 0 1 0 1.414-1.414L13.414 12l4.293-4.293Z","clip-rule":"evenodd"})],-1)]))])])])):(n(),i("label",at,s[39]||(s[39]=[e("svg",{class:"mx-auto h-12 w-12 text-gray-400 cursor-pointer",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},[e("path",{fill:"currentColor",d:"M14 9a1.5 1.5 0 1 1 3 0a1.5 1.5 0 0 1-3 0Z"}),e("path",{fill:"currentColor","fill-rule":"evenodd",d:"M7.268 4.658a54.647 54.647 0 0 1 9.465 0l1.51.132a3.138 3.138 0 0 1 2.831 2.66a30.604 30.604 0 0 1 0 9.1a3.138 3.138 0 0 1-2.831 2.66l-1.51.131c-3.15.274-6.316.274-9.465 0l-1.51-.131a3.138 3.138 0 0 1-2.832-2.66a30.601 30.601 0 0 1 0-9.1a3.138 3.138 0 0 1 2.831-2.66l1.51-.132Zm9.335 1.495a53.147 53.147 0 0 0-9.206 0l-1.51.131A1.638 1.638 0 0 0 4.41 7.672a29.101 29.101 0 0 0-.311 5.17L7.97 8.97a.75.75 0 0 1 1.09.032l3.672 4.13l2.53-.844a.75.75 0 0 1 .796.21l3.519 3.91a29.101 29.101 0 0 0 .014-8.736a1.638 1.638 0 0 0-1.478-1.388l-1.51-.131Zm2.017 11.435l-3.349-3.721l-2.534.844a.75.75 0 0 1-.798-.213l-3.471-3.905l-4.244 4.243c.049.498.11.996.185 1.491a1.638 1.638 0 0 0 1.478 1.389l1.51.131c3.063.266 6.143.266 9.206 0l1.51-.131c.178-.016.35-.06.507-.128Z","clip-rule":"evenodd"})],-1)]))),e("div",nt,[e("label",it,[e("span",null,a(l.$t("Provide examples of the variables or media in the header")),1)])]),e("p",rt,a(l.$t("PNG or JPG files only")),1)])])])])):r("",!0),t.value.header.format==="VIDEO"?(n(),i("div",dt,[e("div",ut,[e("input",{type:"file",class:"sr-only",accept:".mp4",ref:"fileInput",id:"file-upload2",onChange:s[11]||(s[11]=o=>O(o))},null,544),e("div",pt,[e("div",null,[t.value.header.format==="VIDEO"&&t.value.header.example?(n(),i("div",mt,[e("div",ct,[s[41]||(s[41]=e("div",null,[e("svg",{class:"mx-auto h-6 w-6 text-gray-400 cursor-pointer",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},[e("path",{fill:"none",stroke:"currentColor","stroke-width":"1.5",d:"M2 11.5c0-3.287 0-4.931.908-6.038a4 4 0 0 1 .554-.554C4.57 4 6.212 4 9.5 4c3.287 0 4.931 0 6.038.908a4 4 0 0 1 .554.554C17 6.57 17 8.212 17 11.5v1c0 3.287 0 4.931-.908 6.038a4.001 4.001 0 0 1-.554.554C14.43 20 12.788 20 9.5 20c-3.287 0-4.931 0-6.038-.908a4 4 0 0 1-.554-.554C2 17.43 2 15.788 2 12.5v-1Zm15-2l.658-.329c1.946-.973 2.92-1.46 3.63-1.02c.712.44.712 1.528.712 3.703v.292c0 2.176 0 3.263-.711 3.703c-.712.44-1.685-.047-3.63-1.02L17 14.5v-5Z"})])],-1)),e("div",ht,[e("span",vt,a(t.value.header.example.name),1),e("button",{onClick:s[12]||(s[12]=o=>M())},s[40]||(s[40]=[e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},[e("path",{fill:"currentColor","fill-rule":"evenodd",d:"M17.707 7.707a1 1 0 0 0-1.414-1.414L12 10.586L7.707 6.293a1 1 0 0 0-1.414 1.414L10.586 12l-4.293 4.293a1 1 0 1 0 1.414 1.414L12 13.414l4.293 4.293a1 1 0 1 0 1.414-1.414L13.414 12l4.293-4.293Z","clip-rule":"evenodd"})],-1)]))])])])):(n(),i("label",ft,s[42]||(s[42]=[e("svg",{class:"mx-auto h-12 w-12 text-gray-400 cursor-pointer",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},[e("path",{fill:"none",stroke:"currentColor","stroke-width":"1.5",d:"M2 11.5c0-3.287 0-4.931.908-6.038a4 4 0 0 1 .554-.554C4.57 4 6.212 4 9.5 4c3.287 0 4.931 0 6.038.908a4 4 0 0 1 .554.554C17 6.57 17 8.212 17 11.5v1c0 3.287 0 4.931-.908 6.038a4.001 4.001 0 0 1-.554.554C14.43 20 12.788 20 9.5 20c-3.287 0-4.931 0-6.038-.908a4 4 0 0 1-.554-.554C2 17.43 2 15.788 2 12.5v-1Zm15-2l.658-.329c1.946-.973 2.92-1.46 3.63-1.02c.712.44.712 1.528.712 3.703v.292c0 2.176 0 3.263-.711 3.703c-.712.44-1.685-.047-3.63-1.02L17 14.5v-5Z"})],-1)]))),e("div",gt,[e("label",xt,[e("span",null,a(l.$t("Provide examples of the variables or media in the header")),1)])]),e("p",yt,a(l.$t("MP4 files only")),1)])])])])):r("",!0),t.value.header.format==="DOCUMENT"?(n(),i("div",bt,[e("div",_t,[e("input",{type:"file",class:"sr-only",accept:".pdf",ref:"fileInput",id:"file-upload3",onChange:s[13]||(s[13]=o=>O(o))},null,544),e("div",wt,[e("div",null,[t.value.header.format==="DOCUMENT"&&t.value.header.example?(n(),i("div",Ct,[e("div",kt,[s[44]||(s[44]=e("div",null,[e("svg",{class:"mx-auto h-6 w-6 text-gray-400 cursor-pointer",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},[e("path",{fill:"currentColor",d:"M18.53 9L13 3.47a.75.75 0 0 0-.53-.22H8A2.75 2.75 0 0 0 5.25 6v12A2.75 2.75 0 0 0 8 20.75h8A2.75 2.75 0 0 0 18.75 18V9.5a.75.75 0 0 0-.22-.5Zm-5.28-3.19l2.94 2.94h-2.94ZM16 19.25H8A1.25 1.25 0 0 1 6.75 18V6A1.25 1.25 0 0 1 8 4.75h3.75V9.5a.76.76 0 0 0 .75.75h4.75V18A1.25 1.25 0 0 1 16 19.25Z"}),e("path",{fill:"currentColor",d:"M13.49 14.85a3.15 3.15 0 0 1-1.31-1.66a4.44 4.44 0 0 0 .19-2a.8.8 0 0 0-1.52-.19a5 5 0 0 0 .25 2.4A29 29 0 0 1 9.83 16c-.71.4-1.68 1-1.83 1.69c-.12.56.93 2 2.72-1.12a18.58 18.58 0 0 1 2.44-.72a4.72 4.72 0 0 0 2 .61a.82.82 0 0 0 .62-1.38c-.42-.43-1.67-.31-2.29-.23Zm-4.78 3a4.32 4.32 0 0 1 1.09-1.24c-.68 1.08-1.09 1.27-1.09 1.25Zm2.92-6.81c.26 0 .24 1.15.06 1.46a3.07 3.07 0 0 1-.06-1.45Zm-.87 4.88a14.76 14.76 0 0 0 .88-1.92a3.88 3.88 0 0 0 1.08 1.26a12.35 12.35 0 0 0-1.96.67Zm4.7-.18s-.18.22-1.33-.28c1.25-.08 1.46.21 1.33.29Z"})])],-1)),e("div",Vt,[e("span",$t,a(t.value.header.example.name),1),e("button",{onClick:s[14]||(s[14]=o=>M())},s[43]||(s[43]=[e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},[e("path",{fill:"currentColor","fill-rule":"evenodd",d:"M17.707 7.707a1 1 0 0 0-1.414-1.414L12 10.586L7.707 6.293a1 1 0 0 0-1.414 1.414L10.586 12l-4.293 4.293a1 1 0 1 0 1.414 1.414L12 13.414l4.293 4.293a1 1 0 1 0 1.414-1.414L13.414 12l4.293-4.293Z","clip-rule":"evenodd"})],-1)]))])])])):(n(),i("label",Tt,s[45]||(s[45]=[e("svg",{class:"mx-auto h-12 w-12 text-gray-400 cursor-pointer",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},[e("path",{fill:"currentColor",d:"M18.53 9L13 3.47a.75.75 0 0 0-.53-.22H8A2.75 2.75 0 0 0 5.25 6v12A2.75 2.75 0 0 0 8 20.75h8A2.75 2.75 0 0 0 18.75 18V9.5a.75.75 0 0 0-.22-.5Zm-5.28-3.19l2.94 2.94h-2.94ZM16 19.25H8A1.25 1.25 0 0 1 6.75 18V6A1.25 1.25 0 0 1 8 4.75h3.75V9.5a.76.76 0 0 0 .75.75h4.75V18A1.25 1.25 0 0 1 16 19.25Z"}),e("path",{fill:"currentColor",d:"M13.49 14.85a3.15 3.15 0 0 1-1.31-1.66a4.44 4.44 0 0 0 .19-2a.8.8 0 0 0-1.52-.19a5 5 0 0 0 .25 2.4A29 29 0 0 1 9.83 16c-.71.4-1.68 1-1.83 1.69c-.12.56.93 2 2.72-1.12a18.58 18.58 0 0 1 2.44-.72a4.72 4.72 0 0 0 2 .61a.82.82 0 0 0 .62-1.38c-.42-.43-1.67-.31-2.29-.23Zm-4.78 3a4.32 4.32 0 0 1 1.09-1.24c-.68 1.08-1.09 1.27-1.09 1.25Zm2.92-6.81c.26 0 .24 1.15.06 1.46a3.07 3.07 0 0 1-.06-1.45Zm-.87 4.88a14.76 14.76 0 0 0 .88-1.92a3.88 3.88 0 0 0 1.08 1.26a12.35 12.35 0 0 0-1.96.67Zm4.7-.18s-.18.22-1.33-.28c1.25-.08 1.46.21 1.33.29Z"})],-1)]))),e("div",At,[e("label",Ut,[e("span",null,a(l.$t("Provide examples of the variables or media in the header")),1)])]),e("p",Et,a(l.$t("PDF files only")),1)])])])])):r("",!0)]),e("h2",Lt,[y(a(l.$t("Body"))+" ",1),e("span",Ot,"("+a(l.$t("Required"))+")",1)]),e("span",Mt,a(l.$t("Enter the text for your message in the language that you've selected")),1),e("div",It,[e("div",null,[c(ke,{modelValue:t.value.body.text,"onUpdate:modelValue":s[15]||(s[15]=o=>t.value.body.text=o),customValues:t.value.body.example,onUpdateExamples:ue},null,8,["modelValue","customValues"])])]),e("h2",Nt,[y(a(l.$t("Footer description"))+" ",1),e("span",Bt,"("+a(l.$t("Optional"))+")",1)]),e("span",Zt,a(l.$t("Add a short line of text to the bottom of your message template")),1),e("div",Ht,[e("div",null,[c(Ve,{modelValue:t.value.footer.text,"onUpdate:modelValue":s[16]||(s[16]=o=>t.value.footer.text=o),onInput:s[17]||(s[17]=o=>te("footer")),name:l.$t("Footer text"),showLabel:!1,type:"text",textAreaRows:2,class:d("sm:col-span-6")},null,8,["modelValue","name"]),e("span",jt,a(l.$t("Characters"))+": "+a(U.value)+"/"+a(D.value),1)])]),e("h2",Dt,[y(a(l.$t("Buttons"))+" ",1),e("span",Rt,"("+a(l.$t("Optional"))+")",1)]),e("span",Pt,a(l.$t("Create buttons that let customers respond to your message or take action")),1),e("div",Yt,[e("button",{onClick:s[18]||(s[18]=o=>$("call")),class:"flex items-center justify-center text-slate-700 text-sm bg-slate-100 hover:bg-slate-200 hover:shadow-sm rounded-lg p-2 px-4 mr-2"},[e("span",null,a(l.$t("Call phone number (1)")),1)]),e("button",{onClick:s[19]||(s[19]=o=>$("website")),class:"flex items-center justify-center text-slate-700 text-sm bg-slate-100 hover:bg-slate-200 hover:shadow-sm rounded-lg p-2 px-4"},[e("span",null,a(l.$t("Visit website (2)")),1)])]),e("div",zt,[e("button",{onClick:s[20]||(s[20]=o=>$("offer")),class:"flex items-center justify-center text-slate-700 text-sm bg-slate-100 hover:bg-slate-200 hover:shadow-sm rounded-lg p-2 px-4 mr-2"},[e("span",null,a(l.$t("Copy offer code (1)")),1)]),e("button",{onClick:s[21]||(s[21]=o=>$("custom")),class:"flex items-center justify-center text-slate-700 text-sm bg-slate-100 hover:bg-slate-200 hover:shadow-sm rounded-lg p-2 px-4"},[e("span",null,a(l.$t("Custom button (6)")),1)])]),((h=(u=t.value)==null?void 0:u.buttons)==null?void 0:h.length)>0?(n(),i("div",St,[(n(!0),i(T,null,A(t.value.buttons,(o,v)=>(n(),i("div",{key:v,class:"bg-[#f9f9fa] p-3 rounded-lg mb-3"},[e("div",Ft,[e("span",Gt,a(pe(o.type)),1),e("button",{onClick:m=>oe(v),class:"bg-slate-200 hover:shadow rounded-full p-1"},s[46]||(s[46]=[e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24"},[e("path",{fill:"currentColor","fill-rule":"evenodd",d:"M17.707 7.707a1 1 0 0 0-1.414-1.414L12 10.586L7.707 6.293a1 1 0 0 0-1.414 1.414L10.586 12l-4.293 4.293a1 1 0 1 0 1.414 1.414L12 13.414l4.293 4.293a1 1 0 1 0 1.414-1.414L13.414 12l4.293-4.293Z","clip-rule":"evenodd"})],-1)]),8,Kt)]),e("div",Xt,[c(g,{modelValue:o.text,"onUpdate:modelValue":m=>o.text=m,name:l.$t("Button text"),type:"text",class:d(o.type==="QUICK_REPLY"?"w-full":"sm:col-span-2"),labelClass:"mb-0"},null,8,["modelValue","onUpdate:modelValue","name","class"]),o.type==="URL"?(n(),_(g,{key:0,modelValue:o.url,"onUpdate:modelValue":m=>o.url=m,name:l.$t("Website url"),type:"text",class:d("w-full"),labelClass:"mb-0"},null,8,["modelValue","onUpdate:modelValue","name"])):r("",!0),o.type==="PHONE_NUMBER"?(n(),_(g,{key:1,modelValue:o.country,"onUpdate:modelValue":m=>o.country=m,name:l.$t("Country"),type:"text",class:d("sm:col-span-2"),labelClass:"mb-0"},null,8,["modelValue","onUpdate:modelValue","name"])):r("",!0),o.type==="PHONE_NUMBER"?(n(),_(g,{key:2,modelValue:o.phone_number,"onUpdate:modelValue":m=>o.phone_number=m,name:l.$t("Phone number"),type:"text",class:d("sm:col-span-2"),labelClass:"mb-0"},null,8,["modelValue","onUpdate:modelValue","name"])):r("",!0),o.type==="COPY_CODE"?(n(),_(g,{key:3,modelValue:o.example,"onUpdate:modelValue":m=>o.example=m,name:l.$t("Sample code"),type:"text",class:d("w-full"),labelClass:"mb-0"},null,8,["modelValue","onUpdate:modelValue","name"])):r("",!0)])]))),128))])):r("",!0)])):r("",!0),t.value.category==="AUTHENTICATION"?(n(),i("div",Jt,[e("div",qt,[e("h2",Wt,a(l.$t("Code delivery setup")),1),e("span",Qt,a(l.$t("Choose how customers send the code from WhatsApp to your app.")),1),e("div",es,[(n(),i(T,null,A(ne,o=>e("div",{key:o.value,class:"relative flex mb-2"},[e("div",ts,[e("label",ss,[e("input",{type:"radio",class:"hidden",checked:t.value.authentication_button.otp_type===o.value,onChange:v=>{t.value.authentication_button.otp_type=o.value}},null,40,ls),e("div",os,[t.value.authentication_button.otp_type===o.value?(n(),i("div",as)):r("",!0)])])]),e("div",{class:"text-sm leading-6 cursor-pointer",onClick:v=>t.value.authentication_button.otp_type=o.value},[e("label",is,a(l.$t(o.label)),1),e("div",rs,a(l.$t(o.description)),1)],8,ns)])),64))])]),t.value.authentication_button.otp_type!="copy_code"?(n(),i("div",ds,[e("h2",us,a(l.$t("App setup")),1),e("p",ps,a(l.$t("You can add up to 5 apps.")),1),(n(!0),i(T,null,A(t.value.authentication_button.supported_apps,(o,v)=>(n(),i("div",ms,[c(g,{modelValue:t.value.authentication_button.supported_apps[v].package_name,"onUpdate:modelValue":m=>t.value.authentication_button.supported_apps[v].package_name=m,name:l.$t("Package name"),type:"text",class:d("w-3/5"),labelClass:"mb-0"},null,8,["modelValue","onUpdate:modelValue","name"]),c(g,{modelValue:t.value.authentication_button.supported_apps[v].signature_hash,"onUpdate:modelValue":m=>t.value.authentication_button.supported_apps[v].signature_hash=m,name:l.$t("App signature hash"),type:"text",class:d("w-2/5"),labelClass:"mb-0"},null,8,["modelValue","onUpdate:modelValue","name"]),t.value.authentication_button.supported_apps.length>1?(n(),i("span",{key:0,onClick:m=>le(v),class:"mt-7 cursor-pointer bg-slate-100 rounded-full w-6 h-6 flex items-center hover:shadow-md"},s[47]||(s[47]=[e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},[e("path",{fill:"#000",d:"M7.404 7.404a.5.5 0 0 1 .707 0L12 11.293l3.89-3.89a.5.5 0 1 1 .706.708L12.707 12l3.89 3.89a.5.5 0 1 1-.708.706L12 12.707l-3.89 3.89a.5.5 0 1 1-.706-.708L11.293 12l-3.89-3.89a.5.5 0 0 1 0-.706"})],-1)]),8,cs)):r("",!0)]))),256)),e("div",hs,a(l.$t("It is recommended to only include different builds of the same app (which would not coexist on a production user's phone), rather than entirely different apps.")),1),t.value.authentication_button.supported_apps.length<5?(n(),i("button",{key:0,onClick:s[22]||(s[22]=o=>se()),type:"button",class:"bg-white text-sm rounded-md shadow-sm border px-3 py-2"},a(l.$t("Add another app")),1)):r("",!0)])):r("",!0),e("div",vs,[e("h2",fs,a(l.$t("Content")),1),e("p",gs,a(l.$t("Content for authentication message templates can't be edited. You can add additional content from the options below.")),1),e("div",xs,[e("div",ys,[e("div",bs,[B(e("input",{"onUpdate:modelValue":s[23]||(s[23]=o=>t.value.body.add_security_recommendation=o),type:"checkbox",class:"h-4 w-4 rounded border-gray-300 text-indigo-600 focus:ring-indigo-600"},null,512),[[F,t.value.body.add_security_recommendation]])]),e("div",{class:"text-sm leading-6 cursor-pointer",onClick:s[24]||(s[24]=o=>t.value.body.add_security_recommendation=!t.value.body.add_security_recommendation)},[e("label",{for:l.name,class:"text-gray-900 cursor-pointer"},a(l.$t("Add security recommendation")),9,_s)])]),e("div",ws,[e("div",Cs,[B(e("input",{"onUpdate:modelValue":s[25]||(s[25]=o=>t.value.code_expiration=o),type:"checkbox",class:"h-4 w-4 rounded border-gray-300 text-indigo-600 focus:ring-indigo-600"},null,512),[[F,t.value.code_expiration]])]),e("div",{class:"text-sm leading-tight cursor-pointer",onClick:s[26]||(s[26]=o=>t.value.code_expiration=!t.value.code_expiration)},[e("label",{for:l.name,class:"text-gray-900 cursor-pointer"},a(l.$t("Add expiry time for the code")),9,ks),e("div",Vs,a(l.$t("After the code has expired, the auto-fill button will be disabled.")),1)])]),t.value.code_expiration?(n(),i("div",$s,[e("div",Ts,[e("h2",As,a(l.$t("Expires In")),1),e("div",Us,[B(e("input",{type:"number","onUpdate:modelValue":s[27]||(s[27]=o=>t.value.footer.code_expiration_minutes=o),step:"any",class:d(["block w-full rounded-md border-0 py-1.5 px-4 text-gray-900 shadow-sm outline-none ring-1 ring-inset placeholder:text-gray-400 sm:text-sm sm:leading-6",w.value?"ring-[#b91c1c]":"ring-gray-300"])},null,2),[[ye,t.value.footer.code_expiration_minutes]]),e("span",Es,a(l.$t("Minutes")),1)])])])):r("",!0)])]),e("div",Ls,[e("h2",Os,a(l.$t("Buttons")),1),e("p",Ms,a(l.$t("You can customise the button text for both auto-fill and copy code. Even when zero-tap is turned on, buttons are still needed for the backup code delivery method.")),1),t.value.authentication_button.otp_type=="copy_code"?(n(),i("div",Is,[c(g,{modelValue:t.value.authentication_button.text,"onUpdate:modelValue":s[28]||(s[28]=o=>t.value.authentication_button.text=o),name:l.$t("Copy code"),type:"text",class:d(""),labelClass:"mb-0"},null,8,["modelValue","name"])])):(n(),i("div",Ns,[c(g,{modelValue:t.value.authentication_button.autofill_text,"onUpdate:modelValue":s[29]||(s[29]=o=>t.value.authentication_button.autofill_text=o),name:l.$t("Auto-fill"),type:"text",class:d("w-1/2"),labelClass:"mb-0"},null,8,["modelValue","name"]),c(g,{modelValue:t.value.authentication_button.text,"onUpdate:modelValue":s[30]||(s[30]=o=>t.value.authentication_button.text=o),name:l.$t("Copy code"),type:"text",class:d("w-1/2"),labelClass:"mb-0"},null,8,["modelValue","name"])]))])])):r("",!0),t.value.category=="UTILITY"||t.value.category=="AUTHENTICATION"?(n(),i("div",Bs,[e("h2",Zs,a(l.$t("Message validity period")),1),e("p",Hs,a(l.$t("It's recommended to set a custom validity period that your authentication message must be delivered by before it expires. If a message is not delivered within this time frame, you will not be charged and your customer will not see the message.")),1),e("div",js,[e("h2",Ds,a(l.$t("Set custom validity period for your message")),1),e("div",Rs,[e("p",Ps,a(l.$t("If you don't set a custom validity period, the standard 10 minutes WhatsApp message validity period will be applied.")),1),e("div",Ys,[c($e,{modelValue:t.value.customize_ttl,"onUpdate:modelValue":s[31]||(s[31]=o=>t.value.customize_ttl=o)},null,8,["modelValue"])])]),t.value.customize_ttl?(n(),_(Z,{key:0,modelValue:t.value.message_send_ttl_seconds,"onUpdate:modelValue":s[32]||(s[32]=o=>t.value.message_send_ttl_seconds=o),options:t.value.category=="UTILITY"?re.value:ie.value,name:l.$t("Validity period"),class:d("sm:col-span-3"),placeholder:l.$t("Select validity period")},null,8,["modelValue","options","name","placeholder"])):r("",!0)])])):r("",!0)]),e("div",zs,[e("div",Ss,[t.value.header.format!=null&&t.value.header.format!="TEXT"&&t.value.category!="AUTHENTICATION"?(n(),i("div",Fs,[t.value.header.format==="IMAGE"?(n(),i("img",Gs)):r("",!0),t.value.header.format==="VIDEO"?(n(),i("img",Ks)):r("",!0),t.value.header.format==="DOCUMENT"?(n(),i("img",Xs)):r("",!0)])):t.value.header.format=="TEXT"&&t.value.category!="AUTHENTICATION"?(n(),i("h2",Js,a(t.value.header.text),1)):r("",!0),t.value.category!="AUTHENTICATION"?(n(),i("p",{key:2,class:"px-2 normal-case whitespace-pre-wrap",innerHTML:t.value.body.text},null,8,qs)):(n(),i("p",{key:3,class:"px-2 normal-case whitespace-pre-wrap",innerHTML:t.value.body.add_security_recommendation===!0?"{{1}} is your verification code. For your security, do not share this code.":"{{1}} is your verification code."},null,8,Ws)),e("div",Qs,[t.value.category!="AUTHENTICATION"?(n(),i("span",el,a(t.value.footer.text),1)):t.value.category==="AUTHENTICATION"&&t.value.code_expiration==!0?(n(),i("span",tl,a(l.$t("This code expires in"))+" "+a(t.value.footer.code_expiration_minutes)+" "+a("minutes"),1)):r("",!0),e("span",{class:d(["text-right text-xs leading-none float-right",t.value.footer.text?"mt-2":""])},"9:15",2)])]),t.value.category=="AUTHENTICATION"&&t.value.authentication_button.otp_type!="zero_tap"?(n(),i("div",sl,[e("div",ll,[t.value.authentication_button.otp_type=="copy_code"?(n(),i("span",ol,[s[48]||(s[48]=e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 24 24"},[e("path",{fill:"currentColor",d:"M19 21H8V7h11m0-2H8a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h11a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2m-3-4H4a2 2 0 0 0-2 2v14h2V3h12V1Z"})],-1)),y(" "+a(t.value.authentication_button.text),1)])):r("",!0),t.value.authentication_button.otp_type=="one_tap"?(n(),i("span",al,a(t.value.authentication_button.autofill_text),1)):r("",!0)])])):r("",!0),t.value.category!="AUTHENTICATION"&&((S=(x=t.value)==null?void 0:x.buttons)==null?void 0:S.length)>0?(n(),i("div",nl,[(n(!0),i(T,null,A(t.value.buttons,(o,v)=>(n(),i("div",{key:v,class:"flex justify-center items-center space-x-2 rounded-lg bg-white h-10 my-[0.1em]"},[e("span",null,[o.type==="copy_code"?(n(),i("svg",il,s[49]||(s[49]=[e("path",{fill:"currentColor",d:"M19 21H8V7h11m0-2H8a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h11a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2m-3-4H4a2 2 0 0 0-2 2v14h2V3h12V1Z"},null,-1)]))):o.type==="PHONE_NUMBER"?(n(),i("svg",rl,s[50]||(s[50]=[e("g",{fill:"none"},[e("path",{fill:"currentColor",d:"M20 16v4c-2.758 0-5.07-.495-7-1.325c-3.841-1.652-6.176-4.63-7.5-7.675C4.4 8.472 4 5.898 4 4h4l1 4l-3.5 3c1.324 3.045 3.659 6.023 7.5 7.675L16 15l4 1z"}),e("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M13 18.675c1.93.83 4.242 1.325 7 1.325v-4l-4-1l-3 3.675zm0 0C9.159 17.023 6.824 14.045 5.5 11m0 0C4.4 8.472 4 5.898 4 4h4l1 4l-3.5 3z"})],-1)]))):o.type==="URL"?(n(),i("img",dl)):(n(),i("img",ul))]),e("span",null,a(o.text),1)]))),128))])):r("",!0)])])]),c(Te,{label:"",isOpen:E.value,showHeader:!1},{default:N(()=>[e("div",pl,[e("div",ml,[w.value!=null?(n(),i("div",cl,[e("div",null,a(l.$t("Error"))+": ",1),e("div",null,a(w.value),1),e("button",{type:"button",onClick:me,class:"mt-4 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"},"Close")])):(n(),i("div",hl,[e("h2",vl,a(l.$t("Your template is being updated!")),1),s[51]||(s[51]=e("div",{class:"flex justify-center mt-4"},[e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"36",height:"36",viewBox:"0 0 24 24"},[e("path",{fill:"none",stroke:"currentColor","stroke-dasharray":"15","stroke-dashoffset":"15","stroke-linecap":"round","stroke-width":"2",d:"M12 3C16.9706 3 21 7.02944 21 12"},[e("animate",{fill:"freeze",attributeName:"stroke-dashoffset",dur:"0.3s",values:"15;0"}),e("animateTransform",{attributeName:"transform",dur:"1.5s",repeatCount:"indefinite",type:"rotate",values:"0 12 12;360 12 12"})])])],-1))]))])])]),_:1},8,["isOpen"])]}),_:1}))}};export{zl as default};