| Current Path : /home/users/unlimited/www/whatsapp-crm/public/build/assets/ |
| Current File : /home/users/unlimited/www/whatsapp-crm/public/build/assets/Index-e4724632.js |
import $ from"./App-2fea9171.js";import{r as b,O as N,o as n,c as p,a,w as B,v as j,u as l,b as x,e,f as t,k as c,t as o,F as y,d as S,h as k,l as f,j as M}from"./app-43851608.js";import{d as V}from"./debounce-729b203d.js";import{_ as L}from"./Table-69702a89.js";import{T as O,a as z,_ as h}from"./TableHeaderRowItem-459897e8.js";import{T as Z,a as E,_}from"./TableBodyRowItem-110be769.js";import"./App-ad5f7ecb.js";import"./Sidebar-7bb6d772.js";import"./Menu-4221d61f.js";import"./ProfileModal-628e5b7c.js";import"./FormInput-4a309017.js";import"./LangToggle-8d05b0dc.js";import"./MobileSidebar-b73cd192.js";import"./index-99011d5f.js";/* empty css */import"./Sidebar-7b5bc85b.js";import"./_baseGetTag-2e10a2d1.js";import"./Pagination-8172d90a.js";import"./_plugin-vue_export-helper-c27b6911.js";const D={class:"md:bg-white flex items-center border border-primary md:border-none md:shadow-sm h-12 md:h-10 w-full md:w-80 rounded-[0.5rem] mb-6 text-xl md:text-sm"},F=a("span",{class:"pl-3"},[a("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24"},[a("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m15 15l6 6m-11-4a7 7 0 1 1 0-14a7 7 0 0 1 0 14Z"})])],-1),H=["placeholder"],I=a("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},[a("path",{fill:"currentColor",d:"M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10s10-4.5 10-10S17.5 2 12 2zm3.7 12.3c.4.4.4 1 0 1.4c-.4.4-1 .4-1.4 0L12 13.4l-2.3 2.3c-.4.4-1 .4-1.4 0c-.4-.4-.4-1 0-1.4l2.3-2.3l-2.3-2.3c-.4-.4-.4-1 0-1.4c.4-.4 1-.4 1.4 0l2.3 2.3l2.3-2.3c.4-.4 1-.4 1.4 0c.4.4.4 1 0 1.4L13.4 12l2.3 2.3z"})],-1),R=[I],q={key:1,class:"pr-2"},U=M('<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><circle cx="12" cy="3.5" r="1.5" fill="currentColor" opacity="0"><animateTransform attributeName="transform" calcMode="discrete" dur="2.4s" repeatCount="indefinite" type="rotate" values="0 12 12;90 12 12;180 12 12;270 12 12"></animateTransform><animate attributeName="opacity" dur="0.6s" keyTimes="0;0.5;1" repeatCount="indefinite" values="1;1;0"></animate></circle><circle cx="12" cy="3.5" r="1.5" fill="currentColor" opacity="0"><animateTransform attributeName="transform" begin="0.2s" calcMode="discrete" dur="2.4s" repeatCount="indefinite" type="rotate" values="30 12 12;120 12 12;210 12 12;300 12 12"></animateTransform><animate attributeName="opacity" begin="0.2s" dur="0.6s" keyTimes="0;0.5;1" repeatCount="indefinite" values="1;1;0"></animate></circle><circle cx="12" cy="3.5" r="1.5" fill="currentColor" opacity="0"><animateTransform attributeName="transform" begin="0.4s" calcMode="discrete" dur="2.4s" repeatCount="indefinite" type="rotate" values="60 12 12;150 12 12;240 12 12;330 12 12"></animateTransform><animate attributeName="opacity" begin="0.4s" dur="0.6s" keyTimes="0;0.5;1" repeatCount="indefinite" values="1;1;0"></animate></circle></svg>',1),A=[U],G={class:"py-1 px-2 bg-gray-50 rounded-[5px] border border-dashed w-[20em] truncate text-xs capitalize"},J={class:"flex items-center mt-3"},K=a("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},[a("path",{fill:"currentColor","fill-rule":"evenodd",d:"M9.97 7.47a.75.75 0 0 1 1.06 0l4 4a.75.75 0 0 1 0 1.06l-4 4a.75.75 0 1 1-1.06-1.06L13.44 12L9.97 8.53a.75.75 0 0 1 0-1.06Z","clip-rule":"evenodd"})],-1),P={__name:"EmailTemplateTable",props:{rows:{type:Object,required:!0},filters:{type:Object}},setup(d){const s=b({search:d.filters.search}),m=b(!1),T=()=>{s.value.search=null,g()},v=V(()=>{m.value=!0,g()},1e3),g=()=>{const i=window.location.pathname;N.visit(i,{method:"get",data:s.value})};return(i,u)=>(n(),p(y,null,[a("div",D,[F,B(a("input",{onInput:u[0]||(u[0]=(...r)=>l(v)&&l(v)(...r)),"onUpdate:modelValue":u[1]||(u[1]=r=>s.value.search=r),type:"text",class:"outline-none px-4 w-full",placeholder:i.$t("Search here")},null,40,H),[[j,s.value.search]]),m.value===!1&&s.value.search?(n(),p("button",{key:0,onClick:T,type:"button",class:"pr-2"},R)):x("",!0),m.value?(n(),p("span",q,A)):x("",!0)]),e(L,{rows:d.rows},{default:t(()=>[e(O,null,{default:t(()=>[e(z,null,{default:t(()=>[e(h,{position:"first"},{default:t(()=>[c(o(i.$t("Name")),1)]),_:1}),e(h,null,{default:t(()=>[c(o(i.$t("Subject")),1)]),_:1}),e(h,null,{default:t(()=>[c(o(i.$t("Last updated")),1)]),_:1}),e(h,{position:"last"})]),_:1})]),_:1}),e(Z,null,{default:t(()=>[(n(!0),p(y,null,S(d.rows.data,(r,C)=>(n(),k(E,{key:C},{default:t(()=>[e(_,{position:"first",class:"capitalize"},{default:t(()=>[e(l(f),{href:"/admin/settings/email-template/"+r.id},{default:t(()=>[c(o(r.name),1)]),_:2},1032,["href"])]),_:2},1024),e(_,null,{default:t(()=>[e(l(f),{href:"/admin/settings/email-template/"+r.id},{default:t(()=>[a("div",G,o(r.subject),1)]),_:2},1032,["href"])]),_:2},1024),e(_,null,{default:t(()=>[e(l(f),{href:"/admin/settings/email-template/"+r.id},{default:t(()=>[c(o(r.updated_at),1)]),_:2},1032,["href"])]),_:2},1024),e(_,{position:"last"},{default:t(()=>[a("div",J,[e(l(f),{href:"/admin/settings/email-template/"+r.id},{default:t(()=>[K]),_:2},1032,["href"])])]),_:2},1024)]),_:2},1024))),128))]),_:1})]),_:1},8,["rows"])],64))}},Q={class:"text-xl mb-1"},W={class:"mb-6 flex items-center text-sm leading-6 text-gray-600"},X=a("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",viewBox:"0 0 24 24"},[a("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),Y={class:"ml-1 mt-1"},ge={__name:"Index",props:{rows:Object,filters:Object},setup(d){const w=d;return(s,m)=>(n(),k($,null,{default:t(()=>[a("div",null,[a("h2",Q,o(s.$t("Email templates")),1),a("p",W,[X,a("span",Y,o(s.$t("Configure email templates")),1)])]),e(P,{rows:w.rows,filters:w.filters},null,8,["rows","filters"])]),_:1}))}};export{ge as default};