Your IP : 216.73.217.77


Current Path : /home/users/unlimited/www/whatsapp-crm/public/build/assets/
Upload File :
Current File : /home/users/unlimited/www/whatsapp-crm/public/build/assets/Index-31d3ffbd.js

import O from"./App-ad5f7ecb.js";import{T as A,r as $,O as z,o as u,c as _,a as e,w as F,v as L,u as m,b as x,e as t,f as s,k as i,t as o,F as C,d as D,h as T,n as R,i as Z,j as P,l as H}from"./app-43851608.js";import{d as I}from"./debounce-729b203d.js";import{_ as U}from"./AlertModal-1a288ce3.js";import{u as q}from"./useAlertModal-27d09708.js";/* empty css              */import{_ as E}from"./Table-69702a89.js";import{T as G,a as J,_ as d}from"./TableHeaderRowItem-459897e8.js";import{T as K,a as Q,_ as c}from"./TableBodyRowItem-110be769.js";import{_ as W}from"./Dropdown-6e7c10b4.js";import{_ as X,a as k}from"./DropdownItem-48d91d39.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";import"./_baseGetTag-2e10a2d1.js";import"./Pagination-8172d90a.js";import"./_plugin-vue_export-helper-c27b6911.js";import"./use-text-value-242aa4d7.js";import"./use-tree-walker-7c9f6f67.js";const Y={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"},ee=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),te=["placeholder"],se=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),ae=[se],oe={key:1,class:"pr-2"},le=P('<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),ie=[le],re={class:"float-right"},ne={class:"float-right"},de={class:"py-1 float-right rounded-[5px] text-xs px-3 bg-[#ddebf7] text-slate-700"},ce={class:"float-right"},ue=e("button",{class:"inline-flex w-full justify-center rounded-md text-sm font-medium text-black hover:bg-opacity-30 focus:outline-none focus-visible:ring-2 focus-visible:ring-white focus-visible:ring-opacity-75"},[e("span",{class:"hover:bg-[#F6F7F9] hover:rounded-full w-[fit-content] p-2"},[e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24"},[e("path",{fill:"currentColor",d:"M12 16a2 2 0 0 1 2 2a2 2 0 0 1-2 2a2 2 0 0 1-2-2a2 2 0 0 1 2-2m0-6a2 2 0 0 1 2 2a2 2 0 0 1-2 2a2 2 0 0 1-2-2a2 2 0 0 1 2-2m0-6a2 2 0 0 1 2 2a2 2 0 0 1-2 2a2 2 0 0 1-2-2a2 2 0 0 1 2-2Z"})])])],-1),me={__name:"SubscriptionPlanTable",props:{rows:{type:Object,required:!0},filters:{type:Object}},emits:["delete"],setup(p,{emit:w}){const n=p,{isOpenAlert:h,openAlert:B,confirmAlert:N}=q(),S=A({test:null}),V=a=>{S.delete("/admin/plans/"+a)},j=a=>a===n.rows.data.length-1,f=$({search:n.filters.search}),b=$(!1),M=()=>{f.value.search=null,g()},v=I(()=>{b.value=!0,g()},1e3),g=()=>{z.visit("/admin/plans",{method:"get",data:f.value})};return(a,r)=>(u(),_(C,null,[e("div",Y,[ee,F(e("input",{onInput:r[0]||(r[0]=(...l)=>m(v)&&m(v)(...l)),"onUpdate:modelValue":r[1]||(r[1]=l=>f.value.search=l),type:"text",class:"outline-none px-4 w-full",placeholder:a.$t("Search plans")},null,40,te),[[L,f.value.search]]),b.value===!1&&f.value.search?(u(),_("button",{key:0,onClick:M,type:"button",class:"pr-2"},ae)):x("",!0),b.value?(u(),_("span",oe,ie)):x("",!0)]),t(E,{rows:p.rows},{default:s(()=>[t(G,null,{default:s(()=>[t(J,null,{default:s(()=>[t(d,{position:"first"},{default:s(()=>[i(o(a.$t("Name")),1)]),_:1}),t(d,{class:"hidden sm:table-cell"},{default:s(()=>[i(o(a.$t("Price")),1)]),_:1}),t(d,{class:"hidden sm:table-cell"},{default:s(()=>[i(o(a.$t("Period")),1)]),_:1}),t(d,null,{default:s(()=>[e("span",re,o(a.$t("Status")),1)]),_:1}),t(d,{class:"hidden sm:table-cell"},{default:s(()=>[e("span",ne,o(a.$t("Last updated")),1)]),_:1}),t(d,{position:"last"})]),_:1})]),_:1}),t(K,null,{default:s(()=>[(u(!0),_(C,null,D(p.rows.data,(l,y)=>(u(),T(Q,{key:y,class:R(j(y)?"":"border-b")},{default:s(()=>[t(c,{position:"first",class:"capitalize"},{default:s(()=>[i(o(l.name),1)]),_:2},1024),t(c,{class:"hidden sm:table-cell"},{default:s(()=>[i(o(l.price),1)]),_:2},1024),t(c,{class:"hidden sm:table-cell"},{default:s(()=>[i(o(a.$t(l.period)),1)]),_:2},1024),t(c,{class:"capitalize"},{default:s(()=>[e("span",de,o(a.$t(l.status)),1)]),_:2},1024),t(c,{class:"hidden sm:table-cell"},{default:s(()=>[e("span",ce,o(l.updated_at),1)]),_:2},1024),t(c,{position:"last"},{default:s(()=>[t(W,{align:"right",class:"mt-2"},{items:s(()=>[t(X,null,{default:s(()=>[t(k,{href:"/admin/plans/"+l.uuid},{default:s(()=>[i(o(a.$t("View/edit")),1)]),_:2},1032,["href"]),t(k,{as:"button",onClick:ve=>m(B)(l.uuid)},{default:s(()=>[i(o(a.$t("Delete")),1)]),_:2},1032,["onClick"])]),_:2},1024)]),default:s(()=>[ue]),_:2},1024)]),_:2},1024)]),_:2},1032,["class"]))),128))]),_:1})]),_:1},8,["rows"]),t(U,{modelValue:m(h),"onUpdate:modelValue":r[2]||(r[2]=l=>Z(h)?h.value=l:null),onConfirm:r[3]||(r[3]=()=>m(N)(V)),label:a.$t("Delete row"),description:a.$t("Are you sure you want to delete this row? This action can not be undone")},null,8,["modelValue","label","description"])],64))}},pe={class:"bg-white md:bg-inherit pt-10 px-4 md:pt-8 md:p-8 rounded-[5px] text-[#000] h-full md:overflow-y-auto"},fe={class:"flex justify-between"},he={class:"text-xl mb-1"},_e={class:"mb-6 flex items-center text-sm leading-6 text-gray-600"},we=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),be={class:"ml-1 mt-1"},Ie={__name:"Index",props:{allowCreate:{type:Boolean,default:!0},title:String,rows:Object,filters:Object},setup(p){const w=p;return(n,h)=>(u(),T(O,null,{default:s(()=>[e("div",pe,[e("div",fe,[e("div",null,[e("h1",he,o(n.$t("Subscription plans")),1),e("p",_e,[we,e("span",be,o(n.$t("Manage subscription plans")),1)])]),e("div",null,[t(m(H),{href:"/admin/plans/create",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"},{default:s(()=>[i(o(n.$t("Create plan")),1)]),_:1})])]),t(me,{rows:w.rows,filters:w.filters},null,8,["rows","filters"])])]),_:1}))}};export{Ie as default};