File: /home/dmstechonline/whatsapp.dmstech.online/public/build/assets/Add-890042d7.js
import{r as p,G as j,m as pe,f as g,g as C,o as n,a as e,t as o,j as c,h as x,u as z,i as R,n as u,c as i,b as d,a2 as ce,k as me,F as k,e as $,w as M,s as P,v as he,x as ve,O as fe}from"./app-884e4ce3.js";import{_ as ge}from"./App-faae56c7.js";import{_ as v}from"./FormInput-ab713954.js";import{_ as I}from"./FormSelect-1f27a419.js";import{_ as xe}from"./FormTextArea-3daa517d.js";import{_ as ye}from"./FormToggleSwitch-5613ae6f.js";import{_ as be,a as _e}from"./HeaderTextArea-096aae70.js";import{_ as we}from"./Modal-a947e544.js";import"./index-ff0eb693.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"./MobileSidebar-4319591b.js";import"./pusher-e63f75b9.js";import"./useRtl-295d8c04.js";const Ce={class:"px-4 md:px-0 flex flex-col bg-white border-l py-4 text-[#000] md:overflow-y-hidden"},ke={class:"flex justify-between md:px-8 border-b pb-4"},$e={class:"text-xl mb-1"},Ve={class:"flex items-center text-sm leading-6 text-gray-600"},Te={class:"ml-1 mt-1"},Ae={class:"space-x-2 flex items-center"},Ue=["disabled"],Le={key:0},Me={key:1,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},Ie={class:"md:flex md:flex-grow-1 md:h-[88vh] mt-4 md:mt-0"},Ee={class:"md:w-[50%] md:p-8 overflow-y-auto"},Ne={key:0,class:"p-4 md:p-8 overflow-y-auto p-4"},Oe={class:"bg-slate-50 border border-primary shadow rounded-md p-4 py-8"},Ze={class:"text-center text-lg font-medium mb-4"},Be={class:"text-center mb-4"},He={class:"flex justify-center"},je={key:0},ze={key:1},Re={class:"grid gap-x-6 gap-y-4 sm:grid-cols-6 mb-8 capitalize"},Pe={key:0},De={class:"text-slate-600"},Ye={class:"text-xs"},Fe={class:"text-slate-600 text-xs"},Se={class:"grid grid-cols-4 mt-2 bg-[#f9f9fa] rounded-lg mb-4"},Ge={class:"mb-8"},Ke={key:0},We={class:"flex justify-center px-6 pt-5 pb-6 border-2 border-gray-300 border-dashed rounded-md"},Xe={class:"text-center"},Je={key:0,class:"flex justify-center items-center"},qe={class:"flex justify-center items-center space-x-3 py-1 border bg-slate-100 rounded-lg mb-2 w-fit px-2"},Qe={class:"flex items-center space-x-2"},et={class:"text-sm"},tt={key:1,for:"file-upload"},lt={class:"flex text-sm text-gray-600"},st={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"},at={class:"text-xs text-gray-500"},ot={key:1},nt={class:"flex justify-center px-6 pt-5 pb-6 border-2 border-gray-300 border-dashed rounded-md"},it={class:"text-center"},rt={key:0,class:"flex justify-center items-center"},dt={class:"flex justify-center items-center space-x-3 py-1 border bg-slate-100 rounded-lg mb-2 w-fit px-2"},ut={class:"flex items-center space-x-2"},pt={class:"text-sm"},ct={key:1,for:"file-upload2"},mt={class:"flex text-sm text-gray-600"},ht={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"},vt={class:"text-xs text-gray-500"},ft={key:2},gt={class:"flex justify-center px-6 pt-5 pb-6 border-2 border-gray-300 border-dashed rounded-md"},xt={class:"text-center"},yt={key:0,class:"flex justify-center items-center"},bt={class:"flex justify-center items-center space-x-3 py-1 border bg-slate-100 rounded-lg mb-2 w-fit px-2"},_t={class:"flex items-center space-x-2"},wt={class:"text-sm"},Ct={key:1,for:"file-upload3"},kt={class:"flex text-sm text-gray-600"},$t={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"},Vt={class:"text-xs text-gray-500"},Tt={class:"text-slate-600"},At={class:"text-xs"},Ut={class:"text-slate-600 text-xs"},Lt={class:"mb-8"},Mt={class:"text-slate-600"},It={class:"text-xs"},Et={class:"text-slate-600 text-xs"},Nt={class:"mb-8"},Ot={class:"text-xs"},Zt={class:"text-slate-600"},Bt={class:"text-xs"},Ht={class:"text-slate-600 text-xs"},jt={class:"grid grid-cols-2 mt-3 mb-2"},zt={class:"grid grid-cols-2 mt-3 mb-2"},Rt={key:0,class:"mt-3 mb-8"},Pt={class:"flex items-center justify-between pb-1"},Dt={class:"text-sm"},Yt=["onClick"],Ft={class:"flex space-x-1 border-t pt-2"},St={key:1},Gt={class:"mt-4 bg-gray-50 rounded-md p-3"},Kt={class:"text-slate-600"},Wt={class:"text-slate-600 text-xs"},Xt={class:"mt-4"},Jt={class:"flex h-6 items-center mr-2"},qt={class:"flex items-center cursor-pointer"},Qt=["checked","onChange"],el={class:"w-5 h-5 rounded-full border-2 border-gray-400 flex items-center justify-center transition"},tl={key:0,class:"w-2.5 h-2.5 rounded-full bg-primary transition"},ll=["onClick"],sl={class:"text-gray-900 cursor-pointer"},al={class:"text-[11px] leading-tight text-gray-500"},ol={key:0,class:"mt-6 bg-gray-50 rounded-md p-3"},nl={class:"text-slate-600"},il={class:"text-slate-600 leading-tight text-xs mb-4"},rl={class:"flex gap-x-2 rounded-lg mb-3"},dl=["onClick"],ul={class:"bg-slate-200 text-[11px] p-3 rounded-md leading-tight mb-4 text-gray-500"},pl={class:"mt-6 bg-gray-50 rounded-md p-3"},cl={class:"text-slate-600"},ml={class:"text-slate-600 leading-tight text-xs"},hl={class:"mt-4"},vl={class:"relative flex mb-2"},fl={class:"flex h-6 items-center mr-2"},gl=["for"],xl={class:"relative flex mb-2"},yl={class:"flex h-6 items-center mr-2"},bl=["for"],_l={class:"text-[11px] text-slate-600"},wl={key:0,class:"relative flex mb-2"},Cl={class:"bg-white border rounded-md w-full p-2"},kl={class:"mb-2"},$l={class:"w-1/3 flex items-center gap-x-2"},Vl={class:"text-sm"},Tl={class:"mt-6 bg-gray-50 rounded-md p-3"},Al={class:"text-slate-600 mb-1"},Ul={class:"text-slate-600 leading-tight text-xs mb-4"},Ll={key:0},Ml={key:1,class:"flex gap-x-2"},Il={key:2,class:"mt-6 bg-gray-50 rounded-md p-3"},El={class:"text-slate-600 mb-1"},Nl={class:"text-slate-600 leading-tight text-xs"},Ol={class:"mt-4"},Zl={class:"text-slate-600 mb-1"},Bl={class:"flex w-full mb-4"},Hl={class:"w-3/4 text-slate-600 text-[11px]"},jl={class:"w-1/4"},zl={class:"md:w-[50%] py-20 px-4 md:px-20 overflow-y-auto",style:{"background-image":"url('/images/whatsapp-bg-02.png')"}},Rl={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]"},Pl={key:0,class:"mb-4 bg-[#ccd0d5] flex justify-center py-8 rounded"},Dl={key:0,src:"/images/image-placeholder.png"},Yl={key:1,src:"/images/video-placeholder.png"},Fl={key:2,src:"/images/document-placeholder.png"},Sl={key:1,class:"text-gray-700 text-sm mb-1 px-2 normal-case whitespace-pre-wrap"},Gl=["innerHTML"],Kl=["innerHTML"],Wl={class:"text-[#8c8c8c] mt-1 px-2"},Xl={key:0,class:"text-[13px]"},Jl={key:1},ql={key:0,class:"mr-auto text-sm text-[#00a5f4] flex flex-col relative max-w-[25em]"},Ql={key:0,xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 24 24"},es={key:1,xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 24 24"},ts={key:2,src:"/images/icons/link.png",class:"h-4"},ls={key:3,src:"/images/icons/reply.png",class:"h-4"},ss={key:1,class:"mr-auto text-sm text-[#00a5f4] flex flex-col relative max-w-[25em]"},as={class:"flex justify-center items-center space-x-2 rounded-lg bg-white h-10 my-[0.1em]"},os={key:0,class:"flex gap-x-1"},ns={key:1},is={class:"mt-5 grid grid-cols-1 gap-x-6 gap-y-4"},rs={class:"text-center"},ds={key:0,class:"bg-[#fae6e6] text-[darkred] rounded text-sm p-2 mb-4"},us={key:1},ps={class:"text-xl capitalize mt-6"},zs={__name:"Add",props:["languages","settings"],setup(D){const E=D,Y=p("60"),N=p("0"),F=p("1098"),O=p("0"),Z=p("60"),V=p("0"),f=p(!1),S=p(null),T=p(!1),y=p(null);p([]);const t=p({name:null,category:"UTILITY",language:null,message_send_ttl_seconds:null,customize_ttl:!1,header:{format:"TEXT",text:null,example:[]},body:{text:null,variables:null,add_security_recommendation:!1,example:[]},footer:{text:null,code_expiration_minutes:5},code_expiration:!1,set_custom_validity_period:!1,buttons:[],authentication_button:{type:"OTP",otp_type:"zero_tap",text:"Copy Code",autofill_text:"Autofill",zero_tap_terms_accepted:!0,supported_apps:[{package_name:null,signature_hash:null}]}}),B=p(E.settings.metadata),G=p(B.value?JSON.parse(B.value):null),H=p(""),K=l=>{const s=/\*(.*?)\*/g,r=/_(.*?)_/g,a=/~(.*?)~/g,h=/```(.*?)```/g;return l.replace(s,"<b>$1</b>").replace(r,"<i>$1</i>").replace(a,"<del>$1</del>").replace(h,"<code>$1</code>")};j(()=>t.value.body.text,l=>{H.value=l?K(l):null}),p("text");const W=p(E.languages),X=p([{value:"UTILITY",label:"Utility"},{value:"MARKETING",label:"Marketing"},{value:"AUTHENTICATION",label:"Authentication"}]),b=p({}),_=l=>{const s=t.value.header.format;(!(s in b.value)||JSON.stringify(b.value[s])!==JSON.stringify(t.value.header.example))&&(b.value[s]=t.value.header.example),t.value.header.format=l,b.value[l]!==void 0?t.value.header.example=b.value[l]:t.value.header.example=null},J=l=>{const s=l.target.value.toLowerCase();t.value.name=s.replace(/[^a-zA-Z0-9_]/g,"")},A=l=>{const s=l.target.files[0],r=new FileReader;r.onload=a=>{S.value=a.target.result,t.value.header.example=s},r.readAsDataURL(s)},U=()=>{t.value.header.example=""},q=l=>{l.preventDefault(),t.value.name+="_"},Q=l=>{let s=0,r=0;switch(l){case"header":s=Y.value,r=t.value.header.text.length,r<=s?N.value=r:(t.value.header.text=t.value.header.text.slice(0,s),N.value=s);break;case"body":s=F.value,r=t.value.body.text.length,r<=s?O.value=r:(t.value.body.text=t.value.body.text.slice(0,s),O.value=s);break;case"footer":s=Z.value,r=t.value.footer.text.length,r<=s?V.value=r:(t.value.footer.text=t.value.footer.text.slice(0,s),V.value=s);break}},w=l=>{l==="call"?t.value.buttons.filter(r=>r.type==="PHONE_NUMBER").length<1&&t.value.buttons.push({type:"PHONE_NUMBER",country:null,text:null,phone_number:null}):l==="website"?t.value.buttons.filter(r=>r.type==="URL").length<2&&t.value.buttons.push({type:"URL",text:null,url:null}):l==="custom"?t.value.buttons.filter(r=>r.type==="QUICK_REPLY").length<6&&t.value.buttons.push({type:"QUICK_REPLY",text:null}):l==="offer"&&t.value.buttons.filter(r=>r.type==="copy_code").length<1&&t.value.buttons.push({type:"copy_code",example:null})},ee=()=>{t.value.authentication_button.supported_apps.length<5&&t.value.authentication_button.supported_apps.push({package_name:null,signature_hash:null})},te=l=>{t.value.authentication_button.supported_apps.splice(l,1)},le=l=>{l>=0&&l<t.value.buttons.length&&t.value.buttons.splice(l,1)},L=pe(()=>{if(t.value.name===null||t.value.name.trim()===""||t.value.language===null||t.value.language.trim()===""||t.value.category===null||t.value.category.trim()===""||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==="")||t.value.category!=="AUTHENTICATION"&&(t.value.body.text===null||t.value.body.text.trim()===""||t.value.body.example.length>0&&!Object.keys(t.value.body.example).every(s=>{const r=t.value.body.example[s];return r!=null&&r!==""})||t.value.header.example.length>0&&!Object.keys(t.value.header.example).every(l=>{const s=t.value.header.example[l];return s!=null&&s!==""})))return!1;if(t.value.category==="AUTHENTICATION"){const l=t.value.authentication_button;if(!l.otp_type||l.otp_type.trim()===""||(l.otp_type==="copy_code"||l.otp_type==="one_tap"||l.otp_type==="zero_tap")&&(!l.text||l.text.trim()==="")||(l.otp_type==="one_tap"||l.otp_type==="zero_tap")&&(!l.autofill_text||l.autofill_text.trim()==="")||["one_tap","zero_tap"].includes(l.otp_type)&&(!Array.isArray(l.supported_apps)||l.supported_apps.length===0||!l.supported_apps.every(r=>r.package_name&&r.package_name.trim()!==""&&r.signature_hash&&r.signature_hash.trim()!=="")))return!1}return!0}),se=l=>{t.value.body.example=l},ae=l=>{t.value.header.example=l},oe=()=>{f.value=!0,T.value=!0,ve.post("/templates/create",t.value,{headers:{"Content-Type":"multipart/form-data"}}).then(l=>{l.data.success===!1?(f.value=!1,y.value=l.data.data.error.message):fe.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"}]);function de(l){return l.toLowerCase().replace(/_/g," ").replace(/^\w/,s=>s.toUpperCase())}const ue=()=>{T.value=!1,setTimeout(()=>{y.value=null},500)};return j(t,()=>{L.value}),(l,s)=>(n(),g(ge,null,{default:C(()=>{var r;return[e("div",Ce,[e("div",ke,[e("div",null,[e("h2",$e,o(l.$t("New template")),1),e("p",Ve,[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",Te,o(l.$t("Create template for review")),1)])]),e("div",Ae,[c(z(R),{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:C(()=>[x(o(l.$t("Back")),1)]),_:1}),e("button",{onClick:s[0]||(s[0]=a=>oe()),type:"button",class:u(["capitalize 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",L.value===!0?"bg-indigo-600 hover:bg-indigo-500 shadow-sm":"bg-gray-200"]),disabled:!L.value||f.value},[f.value?(n(),i("svg",Me,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",Le,o(l.$t("Create template")),1))],10,Ue)])]),e("div",Ie,[e("div",Ee,[(r=G.value)!=null&&r.whatsapp?(n(),i("div",ze,[e("div",Re,[c(v,{modelValue:t.value.name,"onUpdate:modelValue":s[1]||(s[1]=a=>t.value.name=a),name:l.$t("Name"),type:"text",onInput:J,onKeydown:ce(me(q,["prevent"]),["space"]),class:u("sm:col-span-6")},null,8,["modelValue","name","onKeydown"]),c(I,{modelValue:t.value.category,"onUpdate:modelValue":s[2]||(s[2]=a=>t.value.category=a),options:X.value,name:l.$t("Category"),class:u("sm:col-span-3"),placeholder:l.$t("Select category")},null,8,["modelValue","options","name","placeholder"]),c(I,{modelValue:t.value.language,"onUpdate:modelValue":s[3]||(s[3]=a=>t.value.language=a),options:W.value,name:l.$t("Language"),class:u("sm:col-span-3"),placeholder:l.$t("Select language")},null,8,["modelValue","options","name","placeholder"])]),t.value.category==="UTILITY"||t.value.category==="MARKETING"?(n(),i("div",Pe,[e("h2",De,[x(o(l.$t("Header"))+" ",1),e("span",Ye,"("+o(l.$t("Optional"))+")",1)]),e("span",Fe,o(l.$t("Add a title or choose which type of media you'll use for this header")),1),e("div",Se,[e("button",{onClick:s[4]||(s[4]=a=>_("TEXT")),class:u(["text-center py-2 text-sm text-slate-800 m-1",t.value.header.format==="TEXT"?"bg-white shadow rounded-lg":""])},o(l.$t("Text")),3),e("button",{onClick:s[5]||(s[5]=a=>_("IMAGE")),class:u(["text-center py-2 text-sm text-slate-800 m-1",t.value.header.format==="IMAGE"?"bg-white shadow rounded-lg":""])},o(l.$t("Image")),3),e("button",{onClick:s[6]||(s[6]=a=>_("VIDEO")),class:u(["text-center py-2 text-sm text-slate-800 m-1",t.value.header.format==="VIDEO"?"bg-white shadow rounded-lg":""])},o(l.$t("Video")),3),e("button",{onClick:s[7]||(s[7]=a=>_("DOCUMENT")),class:u(["text-center py-2 text-sm text-slate-800 m-1",t.value.header.format==="DOCUMENT"?"bg-white shadow rounded-lg":""])},o(l.$t("Document")),3)]),e("div",Ge,[e("div",{class:u(t.value.header.format==="TEXT"?"":"hidden")},[c(be,{modelValue:t.value.header.text,"onUpdate:modelValue":s[8]||(s[8]=a=>t.value.header.text=a),customValues:t.value.header.example,onUpdateExamples:ae},null,8,["modelValue","customValues"])],2),t.value.header.format==="IMAGE"?(n(),i("div",Ke,[e("div",We,[e("input",{type:"file",class:"sr-only",accept:".jpg, .png",ref:"fileInput",id:"file-upload",onChange:s[9]||(s[9]=a=>A(a))},null,544),e("div",Xe,[e("div",null,[t.value.header.format==="IMAGE"&&t.value.header.example?(n(),i("div",Je,[e("div",qe,[s[37]||(s[37]=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",Qe,[e("span",et,o(t.value.header.example.name),1),e("button",{onClick:s[10]||(s[10]=a=>U())},s[36]||(s[36]=[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[38]||(s[38]=[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",lt,[e("label",st,[e("span",null,o(l.$t("Provide examples of the variables or media in the header")),1)])]),e("p",at,o(l.$t("PNG or JPG files only")),1)])])])])):d("",!0),t.value.header.format==="VIDEO"?(n(),i("div",ot,[e("div",nt,[e("input",{type:"file",class:"sr-only",accept:".mp4",ref:"fileInput",id:"file-upload2",onChange:s[11]||(s[11]=a=>A(a))},null,544),e("div",it,[e("div",null,[t.value.header.format==="VIDEO"&&t.value.header.example?(n(),i("div",rt,[e("div",dt,[s[40]||(s[40]=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",ut,[e("span",pt,o(t.value.header.example.name),1),e("button",{onClick:s[12]||(s[12]=a=>U())},s[39]||(s[39]=[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",ct,s[41]||(s[41]=[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",mt,[e("label",ht,[e("span",null,o(l.$t("Provide examples of the variables or media in the header")),1)])]),e("p",vt,o(l.$t("MP4 files only")),1)])])])])):d("",!0),t.value.header.format==="DOCUMENT"?(n(),i("div",ft,[e("div",gt,[e("input",{type:"file",class:"sr-only",accept:".pdf",ref:"fileInput",id:"file-upload3",onChange:s[13]||(s[13]=a=>A(a))},null,544),e("div",xt,[e("div",null,[t.value.header.format==="DOCUMENT"&&t.value.header.example?(n(),i("div",yt,[e("div",bt,[s[43]||(s[43]=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",_t,[e("span",wt,o(t.value.header.example.name),1),e("button",{onClick:s[14]||(s[14]=a=>U())},s[42]||(s[42]=[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",Ct,s[44]||(s[44]=[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",kt,[e("label",$t,[e("span",null,o(l.$t("Provide examples of the variables or media in the header")),1)])]),e("p",Vt,o(l.$t("PDF files only")),1)])])])])):d("",!0)]),e("h2",Tt,[x(o(l.$t("Body"))+" ",1),e("span",At,"("+o(l.$t("Required"))+")",1)]),e("span",Ut,o(l.$t("Enter the text for your message in the language that you've selected")),1),e("div",Lt,[e("div",null,[c(_e,{modelValue:t.value.body.text,"onUpdate:modelValue":s[15]||(s[15]=a=>t.value.body.text=a),onUpdateExamples:se},null,8,["modelValue"])])]),e("h2",Mt,[x(o(l.$t("Footer description"))+" ",1),e("span",It,"("+o(l.$t("Optional"))+")",1)]),e("span",Et,o(l.$t("Add a short line of text to the bottom of your message template")),1),e("div",Nt,[e("div",null,[c(xe,{modelValue:t.value.footer.text,"onUpdate:modelValue":s[16]||(s[16]=a=>t.value.footer.text=a),onInput:s[17]||(s[17]=a=>Q("footer")),name:l.$t("Footer text"),showLabel:!1,type:"text",textAreaRows:2,class:u("sm:col-span-6")},null,8,["modelValue","name"]),e("span",Ot,o(l.$t("Characters"))+": "+o(V.value)+"/"+o(Z.value),1)])]),e("h2",Zt,[x(o(l.$t("Buttons"))+" ",1),e("span",Bt,"("+o(l.$t("Optional"))+")",1)]),e("span",Ht,o(l.$t("Create buttons that let customers respond to your message or take action")),1),e("div",jt,[e("button",{onClick:s[18]||(s[18]=a=>w("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,o(l.$t("Call phone number (1)")),1)]),e("button",{onClick:s[19]||(s[19]=a=>w("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,o(l.$t("Visit website (2)")),1)])]),e("div",zt,[e("button",{onClick:s[20]||(s[20]=a=>w("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,o(l.$t("Copy offer code (1)")),1)]),e("button",{onClick:s[21]||(s[21]=a=>w("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,o(l.$t("Custom button (6)")),1)])]),t.value.buttons.length>0?(n(),i("div",Rt,[(n(!0),i(k,null,$(t.value.buttons,(a,h)=>(n(),i("div",{key:h,class:"bg-[#f9f9fa] p-3 rounded-lg mb-3"},[e("div",Pt,[e("span",Dt,o(l.$t(de(a.type))),1),e("button",{onClick:m=>le(h),class:"bg-slate-200 hover:shadow rounded-full p-1"},s[45]||(s[45]=[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,Yt)]),e("div",Ft,[c(v,{modelValue:a.text,"onUpdate:modelValue":m=>a.text=m,name:l.$t("Button text"),type:"text",class:u(a.type==="QUICK_REPLY"?"w-full":"sm:col-span-2"),labelClass:"mb-0"},null,8,["modelValue","onUpdate:modelValue","name","class"]),a.type==="URL"?(n(),g(v,{key:0,modelValue:a.url,"onUpdate:modelValue":m=>a.url=m,name:l.$t("Website url"),type:"url",class:u("w-full"),labelClass:"mb-0"},null,8,["modelValue","onUpdate:modelValue","name"])):d("",!0),a.type==="PHONE_NUMBER"?(n(),g(v,{key:1,modelValue:a.country,"onUpdate:modelValue":m=>a.country=m,name:l.$t("Country"),type:"text",class:u("sm:col-span-2"),labelClass:"mb-0"},null,8,["modelValue","onUpdate:modelValue","name"])):d("",!0),a.type==="PHONE_NUMBER"?(n(),g(v,{key:2,modelValue:a.phone_number,"onUpdate:modelValue":m=>a.phone_number=m,name:l.$t("Phone number"),type:"text",class:u("sm:col-span-2"),labelClass:"mb-0"},null,8,["modelValue","onUpdate:modelValue","name"])):d("",!0),a.type==="copy_code"?(n(),g(v,{key:3,modelValue:a.example,"onUpdate:modelValue":m=>a.example=m,name:l.$t("Sample code"),type:"text",class:u("w-full"),labelClass:"mb-0"},null,8,["modelValue","onUpdate:modelValue","name"])):d("",!0)])]))),128))])):d("",!0)])):d("",!0),t.value.category==="AUTHENTICATION"?(n(),i("div",St,[e("div",Gt,[e("h2",Kt,o(l.$t("Code delivery setup")),1),e("span",Wt,o(l.$t("Choose how customers send the code from WhatsApp to your app.")),1),e("div",Xt,[(n(),i(k,null,$(ne,a=>e("div",{key:a.value,class:"relative flex mb-2"},[e("div",Jt,[e("label",qt,[e("input",{type:"radio",class:"hidden",checked:t.value.authentication_button.otp_type===a.value,onChange:h=>{t.value.authentication_button.otp_type=a.value}},null,40,Qt),e("div",el,[t.value.authentication_button.otp_type===a.value?(n(),i("div",tl)):d("",!0)])])]),e("div",{class:"text-sm leading-6 cursor-pointer",onClick:h=>t.value.authentication_button.otp_type=a.value},[e("label",sl,o(l.$t(a.label)),1),e("div",al,o(l.$t(a.description)),1)],8,ll)])),64))])]),t.value.authentication_button.otp_type!="copy_code"?(n(),i("div",ol,[e("h2",nl,o(l.$t("App setup")),1),e("p",il,o(l.$t("You can add up to 5 apps.")),1),(n(!0),i(k,null,$(t.value.authentication_button.supported_apps,(a,h)=>(n(),i("div",rl,[c(v,{modelValue:t.value.authentication_button.supported_apps[h].package_name,"onUpdate:modelValue":m=>t.value.authentication_button.supported_apps[h].package_name=m,name:l.$t("Package name"),type:"text",class:u("w-3/5"),labelClass:"mb-0"},null,8,["modelValue","onUpdate:modelValue","name"]),c(v,{modelValue:t.value.authentication_button.supported_apps[h].signature_hash,"onUpdate:modelValue":m=>t.value.authentication_button.supported_apps[h].signature_hash=m,name:l.$t("App signature hash"),type:"text",class:u("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=>te(h),class:"mt-7 cursor-pointer bg-slate-100 rounded-full w-6 h-6 flex items-center hover:shadow-md"},s[46]||(s[46]=[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,dl)):d("",!0)]))),256)),e("div",ul,o(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]=a=>ee()),type:"button",class:"bg-white text-sm rounded-md shadow-sm border px-3 py-2"},o(l.$t("Add another app")),1)):d("",!0)])):d("",!0),e("div",pl,[e("h2",cl,o(l.$t("Content")),1),e("p",ml,o(l.$t("Content for authentication message templates can't be edited. You can add additional content from the options below.")),1),e("div",hl,[e("div",vl,[e("div",fl,[M(e("input",{"onUpdate:modelValue":s[23]||(s[23]=a=>t.value.body.add_security_recommendation=a),type:"checkbox",class:"h-4 w-4 rounded border-gray-300 text-indigo-600 focus:ring-indigo-600"},null,512),[[P,t.value.body.add_security_recommendation]])]),e("div",{class:"text-sm leading-6 cursor-pointer",onClick:s[24]||(s[24]=a=>t.value.body.add_security_recommendation=!t.value.body.add_security_recommendation)},[e("label",{for:l.name,class:"text-gray-900 cursor-pointer"},o(l.$t("Add security recommendation")),9,gl)])]),e("div",xl,[e("div",yl,[M(e("input",{"onUpdate:modelValue":s[25]||(s[25]=a=>t.value.code_expiration=a),type:"checkbox",class:"h-4 w-4 rounded border-gray-300 text-indigo-600 focus:ring-indigo-600"},null,512),[[P,t.value.code_expiration]])]),e("div",{class:"text-sm leading-tight cursor-pointer",onClick:s[26]||(s[26]=a=>t.value.code_expiration=!t.value.code_expiration)},[e("label",{for:l.name,class:"text-gray-900 cursor-pointer"},o(l.$t("Add expiry time for the code")),9,bl),e("div",_l,o(l.$t("After the code has expired, the auto-fill button will be disabled.")),1)])]),t.value.code_expiration?(n(),i("div",wl,[e("div",Cl,[e("h2",kl,o(l.$t("Expires In")),1),e("div",$l,[M(e("input",{type:"number","onUpdate:modelValue":s[27]||(s[27]=a=>t.value.footer.code_expiration_minutes=a),step:"any",class:u(["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",y.value?"ring-[#b91c1c]":"ring-gray-300"])},null,2),[[he,t.value.footer.code_expiration_minutes]]),e("span",Vl,o(l.$t("Minutes")),1)])])])):d("",!0)])]),e("div",Tl,[e("h2",Al,o(l.$t("Buttons")),1),e("p",Ul,o(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",Ll,[c(v,{modelValue:t.value.authentication_button.text,"onUpdate:modelValue":s[28]||(s[28]=a=>t.value.authentication_button.text=a),name:l.$t("Copy code"),type:"text",class:u(""),labelClass:"mb-0"},null,8,["modelValue","name"])])):(n(),i("div",Ml,[c(v,{modelValue:t.value.authentication_button.autofill_text,"onUpdate:modelValue":s[29]||(s[29]=a=>t.value.authentication_button.autofill_text=a),name:l.$t("Auto-fill"),type:"text",class:u("w-1/2"),labelClass:"mb-0"},null,8,["modelValue","name"]),c(v,{modelValue:t.value.authentication_button.text,"onUpdate:modelValue":s[30]||(s[30]=a=>t.value.authentication_button.text=a),name:l.$t("Copy code"),type:"text",class:u("w-1/2"),labelClass:"mb-0"},null,8,["modelValue","name"])]))])])):d("",!0),t.value.category=="UTILITY"||t.value.category=="AUTHENTICATION"?(n(),i("div",Il,[e("h2",El,o(l.$t("Message validity period")),1),e("p",Nl,o(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",Ol,[e("h2",Zl,o(l.$t("Set custom validity period for your message")),1),e("div",Bl,[e("p",Hl,o(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",jl,[c(ye,{modelValue:t.value.customize_ttl,"onUpdate:modelValue":s[31]||(s[31]=a=>t.value.customize_ttl=a)},null,8,["modelValue"])])]),t.value.customize_ttl?(n(),g(I,{key:0,modelValue:t.value.message_send_ttl_seconds,"onUpdate:modelValue":s[32]||(s[32]=a=>t.value.message_send_ttl_seconds=a),options:t.value.category=="UTILITY"?re.value:ie.value,name:l.$t("Validity period"),class:u("sm:col-span-3"),placeholder:l.$t("Select validity period")},null,8,["modelValue","options","name","placeholder"])):d("",!0)])])):d("",!0)])):(n(),i("div",Ne,[e("div",Oe,[s[35]||(s[35]=e("div",{class:"flex justify-center mb-4"},[e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"72",height:"72",viewBox:"0 0 48 48"},[e("path",{fill:"black",d:"M43.634 4.366a1.25 1.25 0 0 1 0 1.768l-4.913 4.913a9.253 9.253 0 0 1-.744 12.244l-3.343 3.343a1.25 1.25 0 0 1-1.768 0l-11.5-11.5a1.25 1.25 0 0 1 0-1.768l3.343-3.343a9.25 9.25 0 0 1 12.244-.743l4.913-4.914a1.25 1.25 0 0 1 1.768 0m-7.611 7.425a6.75 6.75 0 0 0-9.546 0l-2.46 2.459l9.733 9.732l2.46-2.459a6.75 6.75 0 0 0 0-9.546zM9.28 36.953l-4.914 4.913a1.25 1.25 0 0 0 1.768 1.768l4.913-4.913a9.253 9.253 0 0 0 12.244-.744l3.343-3.343a1.25 1.25 0 0 0 0-1.768L25.268 31.5l3.366-3.366a1.25 1.25 0 0 0-1.768-1.768L23.5 29.732L18.268 24.5l3.366-3.366a1.25 1.25 0 0 0-1.768-1.768L16.5 22.732l-1.366-1.366a1.25 1.25 0 0 0-1.768 0l-3.343 3.343a9.25 9.25 0 0 0-.743 12.244m2.51-10.476l2.46-2.46l9.732 9.733l-2.459 2.46a6.75 6.75 0 0 1-9.546 0l-.186-.187a6.75 6.75 0 0 1 0-9.546"})])],-1)),e("h3",Ze,o(l.$t("Connect your whatsapp account")),1),e("h4",Be,o(l.$t("You need to connect your WhatsApp account first before you can create a template.")),1),e("div",He,[c(z(R),{href:"/settings/whatsapp",class:"rounded-md px-3 py-2 text-sm hover:shadow-md text-white focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600 bg-primary",disabled:f.value},{default:C(()=>[f.value?d("",!0):(n(),i("span",je,o(l.$t("Connect Whatsapp account")),1))]),_:1},8,["disabled"])])])]))]),e("div",zl,[e("div",Rl,[t.value.header.format!="TEXT"?(n(),i("div",Pl,[t.value.header.format==="IMAGE"?(n(),i("img",Dl)):d("",!0),t.value.header.format==="VIDEO"?(n(),i("img",Yl)):d("",!0),t.value.header.format==="DOCUMENT"?(n(),i("img",Fl)):d("",!0)])):(n(),i("h2",Sl,o(t.value.header.text),1)),t.value.category!="AUTHENTICATION"?(n(),i("p",{key:2,class:"px-2 normal-case whitespace-pre-wrap",innerHTML:H.value},null,8,Gl)):(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,Kl)),e("div",Wl,[t.value.category!="AUTHENTICATION"?(n(),i("span",Xl,o(t.value.footer.text),1)):t.value.category==="AUTHENTICATION"&&t.value.code_expiration==!0?(n(),i("span",Jl,o(l.$t("This code expires in"))+" "+o(t.value.footer.code_expiration_minutes)+" "+o("minutes"),1)):d("",!0),e("span",{class:u(["text-right text-xs leading-none float-right",t.value.footer.text?"mt-2":""])},"9:15",2)])]),t.value.buttons.length>0?(n(),i("div",ql,[(n(!0),i(k,null,$(t.value.buttons,(a,h)=>(n(),i("div",{key:h,class:"flex justify-center items-center space-x-2 rounded-lg bg-white h-10 my-[0.1em]"},[e("span",null,[a.type==="copy_code"?(n(),i("svg",Ql,s[47]||(s[47]=[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)]))):a.type==="PHONE_NUMBER"?(n(),i("svg",es,s[48]||(s[48]=[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)]))):a.type==="URL"?(n(),i("img",ts)):(n(),i("img",ls))]),e("span",null,o(a.text),1)]))),128))])):d("",!0),t.value.category=="AUTHENTICATION"&&t.value.authentication_button.otp_type!="zero_tap"?(n(),i("div",ss,[e("div",as,[t.value.authentication_button.otp_type=="copy_code"?(n(),i("span",os,[s[49]||(s[49]=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)),x(" "+o(t.value.authentication_button.text),1)])):d("",!0),t.value.authentication_button.otp_type=="one_tap"?(n(),i("span",ns,o(t.value.authentication_button.autofill_text),1)):d("",!0)])])):d("",!0)])])]),c(we,{label:"",isOpen:T.value,showHeader:!1},{default:C(()=>[e("div",is,[e("div",rs,[y.value!=null?(n(),i("div",ds,[e("div",null,o(l.$t("Error"))+": ",1),e("div",null,o(y.value),1),e("button",{type:"button",onClick:ue,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",us,[e("h2",ps,o(l.$t("Your template is being uploaded!")),1),s[50]||(s[50]=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{zs as default};