| Current Path : /home/users/unlimited/www/whatsapp-crm/public/build/assets/ |
| Current File : /home/users/unlimited/www/whatsapp-crm/public/build/assets/Index-aeeafdba.js |
import M from"./App-2fea9171.js";import{r as u,O as N,o as d,c as v,a as e,w as B,v as V,u as m,b as C,e as t,f as a,k as w,t as n,F as T,d as j,h as $,l as y,j as O,T as S}from"./app-43851608.js";import{d as L}from"./debounce-729b203d.js";import{_ as F}from"./Table-69702a89.js";import{T as I,a as Z,_ as x}from"./TableHeaderRowItem-459897e8.js";import{T as z,a as D,_ as k}from"./TableBodyRowItem-110be769.js";import{_ as P}from"./FormModalModified-5e65e3b9.js";import{t as U}from"./index-17cd980e.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";import"./Modal-22a49fae.js";import"./FormImage-5b2df4ab.js";import"./FormSelect-2d73589a.js";import"./use-text-value-242aa4d7.js";import"./ChevronUpDownIcon-8859f144.js";import"./FormTextArea-a182534a.js";const A={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"},H=e("span",{class:"pl-3"},[e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24"},[e("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),R=["placeholder"],q=e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},[e("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),E=[q],G={key:1,class:"pr-2"},J=O('<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),K=[J],Q={class:"flex items-center mt-3"},W=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:"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),X={__name:"PageTable",props:{rows:{type:Object,required:!0},filters:{type:Object}},setup(c){const s=u({search:c.filters.search}),p=u(!1),_=()=>{s.value.search=null,f()},h=L(()=>{p.value=!0,f()},1e3),f=()=>{const i=window.location.pathname;N.visit(i,{method:"get",data:s.value})};return(i,l)=>(d(),v(T,null,[e("div",A,[H,B(e("input",{onInput:l[0]||(l[0]=(...o)=>m(h)&&m(h)(...o)),"onUpdate:modelValue":l[1]||(l[1]=o=>s.value.search=o),type:"text",class:"outline-none px-4 w-full",placeholder:i.$t("Search here")},null,40,R),[[V,s.value.search]]),p.value===!1&&s.value.search?(d(),v("button",{key:0,onClick:_,type:"button",class:"pr-2"},E)):C("",!0),p.value?(d(),v("span",G,K)):C("",!0)]),t(F,{rows:c.rows},{default:a(()=>[t(I,null,{default:a(()=>[t(Z,null,{default:a(()=>[t(x,{position:"first"},{default:a(()=>[w(n(i.$t("Name")),1)]),_:1}),t(x,null,{default:a(()=>[w(n(i.$t("Last updated")),1)]),_:1}),t(x,{position:"last"})]),_:1})]),_:1}),t(z,null,{default:a(()=>[(d(!0),v(T,null,j(c.rows.data,(o,r)=>(d(),$(D,{key:r},{default:a(()=>[t(k,{position:"first",class:"capitalize"},{default:a(()=>[t(m(y),{href:"/admin/settings/page/"+o.id},{default:a(()=>[w(n(o.name),1)]),_:2},1032,["href"])]),_:2},1024),t(k,null,{default:a(()=>[t(m(y),{href:"/admin/settings/page/"+o.id},{default:a(()=>[w(n(o.updated_at),1)]),_:2},1032,["href"])]),_:2},1024),t(k,{position:"last"},{default:a(()=>[e("div",Q,[t(m(y),{href:"/admin/settings/page/"+o.id},{default:a(()=>[W]),_:2},1032,["href"])])]),_:2},1024)]),_:2},1024))),128))]),_:1})]),_:1},8,["rows"])],64))}},Y={class:"flex justify-between"},ee={class:"text-xl mb-1"},te={class:"mb-6 flex items-center text-sm leading-6 text-gray-600"},oe=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),ae={class:"ml-1 mt-1"},je={__name:"Index",props:{rows:Object,filters:Object},setup(c){const g=c,s=u(!1),p=u("Add Page"),_=u("/admin/settings/pages"),h=u("post"),f=S({name:null}),i=[{inputType:"FormInput",name:"name",label:U("name"),type:"text",className:"sm:col-span-6"}],l=(o,r={})=>{f.name=null,s.value=!0};return(o,r)=>(d(),$(M,null,{default:a(()=>[e("div",Y,[e("div",null,[e("h2",ee,n(o.$t("Frontend Pages")),1),e("p",te,[oe,e("span",ae,n(o.$t("Configure content in frontend pages")),1)])]),e("div",null,[e("button",{onClick:r[0]||(r[0]=b=>l()),type:"button",class:"rounded-md bg-indigo-600 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"},n(o.$t("Add page")),1)])]),t(X,{rows:g.rows,filters:g.filters},null,8,["rows","filters"]),t(P,{modelValue:s.value,"onUpdate:modelValue":r[1]||(r[1]=b=>s.value=b),label:p.value,url:_.value,form:m(f),formInputs:i,formMethod:h.value,onCloseModal:r[2]||(r[2]=b=>s.value=!1)},null,8,["modelValue","label","url","form","formMethod"])]),_:1}))}};export{je as default};