1import{j as e,v as y,b as j,e as v,r as c,C as k,w as H,bK as V,bf as M}from"./index-Csf1K8Hn.js";import{s as N}from"./administrationsSlice-CBXBCe8K.js";import{u as D}from"./index-BlWfpiq7.js";import{u as Z}from"./administrationsApiSlice-QOJlgS2T.js";import{f as S}from"./date-BJ3TgLaO.js";import"./index-BL8FQxpt.js";import"./index-Chjiymov.js";const A=({data:r})=>{const d=()=>{const a=new Date,i=new Date(r==null?void 0:r["trial-end-date"]).getTime()-a.getTime(),o=Math.ceil(i/(1e3*3600*24));return o>0?o:0},g=a=>{const n=new Date(a),o=["January","February","March","April","May","June","July","August","September","October","November","December"][n.getMonth()],l=n.getDate(),x=n.getFullYear();return`${o} ${l.toString().padStart(2,"0")}, ${x}`};return e.jsxs("div",{className:"w-full",children:[e.jsx("div",{className:"flex p-3 rounded-[12px]"}),e.jsxs("div",{className:"flex flex-col justify-start text-start absolute bottom-5 start-5 w-[90%]",children:[e.jsx("p",{className:"text-gray-600 dark:text-gray-400 font-medium text-[14px] leading-[18px] mb-4",children:r==null?void 0:r.name}),e.jsx("p",{className:"text-gray-500 dark:text-gray-400 font-normal text-[12px] leading-[16px]",children:S(r==null?void 0:r["created-date"])}),(r==null?void 0:r.trial)&&e.jsxs("div",{className:"flex justify-between w-[90%]",children:[e.jsxs("span",{className:"text-gray-400 dark:text-gray-500 font-normal text-[12px] leading-[16px]",children:["Expire on : ",g(r==null?void 0:r["trial-end-date"])]}),e.jsxs("span",{className:"text-blue-600 font-normal text-[10px] leading-[14px] dark:text-blue-400",children:[d()," days left"]})]})]})]})},E=()=>{const{data:r,isLoading:d,isFetching:g}=Z(void 0),a=y(),{t:n}=j("translation"),i=n("adminstratorSetting",{returnObjects:!0}),o=v(),[l,x]=c.useState(""),[p,u]=c.useState(!1),m=c.useRef(null),b=D({query:"(max-width: 1224px)"}),{hasManageSettingsPermission:f}=k(),h=t=>{f&&(o(N(t)),a.navigate({to:`/administrations/${t}/settings/overview`}))},C=()=>{u(!0)};c.useEffect(()=>{const t=s=>{m.current&&!m.current.contains(s.target)&&u(!1)};return document.addEventListener("mousedown",t),()=>{document.removeEventListener("mousedown",t)}},[]);const w=t=>{const s=["bg-gray-50 dark:bg-neutral-900","bg-green-50 dark:bg-green-950/40","bg-red-50 dark:bg-red-950/40","bg-indigo-50 dark:bg-indigo-950/40","bg-green-50 dark:bg-green-950/40","bg-indigo-50 dark:bg-indigo-950/40","bg-orange-50 dark:bg-orange-950/40","bg-indigo-50 dark:bg-indigo-950/40","bg-cyan-50 dark:bg-cyan-950/40","bg-red-50 dark:bg-red-950/40","bg-teal-50 dark:bg-teal-950/40","bg-gray-50 dark:bg-neutral-900"];return s[t%s.length]};return e.jsxs("div",{className:"h-[94vh] bg-white dark:bg-neutral-950 rounded-[12px] mt-4",children:[e.jsx("section",{className:H("bg-white dark:bg-neutral-950 rounded-xl p-4 w-full mb-4 "),children:e.jsx("header",{className:"flex items-center justify-between",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("svg",{width:"20",height:"18",viewBox:"0 0 20 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M0.365479 16.2308V1.769C0.365479 1.34733 0.513228 0.98875 0.808728 0.69325C1.10423 0.39775 1.46281 0.25 1.88448 0.25H8.34623C8.7679 0.25 9.12648 0.39775 9.42198 0.69325C9.71748 0.98875 9.86523 1.34733 9.86523 1.769V4.25H18.1155C18.5371 4.25 18.8957 4.39775 19.1912 4.69325C19.4867 4.98875 19.6345 5.34733 19.6345 5.769V16.2308C19.6345 16.6524 19.4867 17.0111 19.1912 17.3068C18.8957 17.6023 18.5371 17.75 18.1155 17.75H1.88448C1.46281 17.75 1.10423 17.6023 0.808728 17.3068C0.513228 17.0111 0.365479 16.6524 0.365479 16.2308ZM1.86523 16.25H4.36548V13.75H1.86523V16.25ZM1.86523 12.25H4.36548V9.75H1.86523V12.25ZM1.86523 8.25H4.36548V5.75H1.86523V8.25ZM1.86523 4.25H4.36548V1.75H1.86523V4.25ZM5.86523 16.25H8.36548V13.75H5.86523V16.25ZM5.86523 12.25H8.36548V9.75H5.86523V12.25ZM5.86523 8.25H8.36548V5.75H5.86523V8.25ZM5.86523 4.25H8.36548V1.75H5.86523V4.25ZM9.86523 16.25H18.1347V5.75H9.86523V8.25H12.0577V9.75H9.86523V12.25H12.0577V13.75H9.86523V16.25ZM14.25 9.75V8.25H15.75V9.75H14.25ZM14.25 13.75V12.25H15.75V13.75H14.25Z",fill:"#D4D4D4"})}),e.jsx("h1",{className:"text-xl text-gray-900 dark:text-gray-100 font-medium flex items-center gap-2 w-max",children:i==null?void 0:i.myAdministrations}),e.jsx(V,{})]})})}),e.jsxs("div",{className:"relative flex items-center justify-end mx-5",children:[e.jsx("input",{ref:m,type:"search",placeholder:"Search...",value:l,onCh
1ange:t=>x(t.target.value),onFocus:C,className:`transition-all duration-300 ease-in-out ms-1 border border-[#BFD6DD] dark:border-neutral-700 text-[14px] rounded-xl h-[36px] p-2 pe-8 dark:bg-neutral-900 dark:text-gray-200 ${p||l?"w-40":"w-24"}`}),e.jsx("div",{className:"absolute end-2 pointer-events-none",children:e.jsx("svg",{width:"18",height:"18",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{d:"M5.11628 9.80357C3.81781 9.80357 2.71315 9.34823 1.80232 8.43753C0.891626 7.5267 0.436279 6.42225 0.436279 5.1242C0.436279 3.82614 0.891626 2.7217 1.80232 1.81087C2.71315 0.900172 3.8176 0.444824 5.11565 0.444824C6.41371 0.444824 7.51815 0.900172 8.42899 1.81087C9.33968 2.7217 9.79503 3.82635 9.79503 5.12482C9.79503 5.66969 9.70559 6.19066 9.5267 6.68774C9.34767 7.18496 9.10538 7.63385 8.79982 8.03441L13.3865 12.6211C13.5019 12.7364 13.5609 12.8605 13.5636 12.9936C13.5662 13.1266 13.5072 13.2535 13.3865 13.3742C13.2658 13.4949 13.1368 13.5552 12.9994 13.5552C12.8622 13.5552 12.7332 13.4949 12.6125 13.3742L8.02586 8.80837C7.6092 9.12462 7.15232 9.36955 6.65524 9.54316C6.15815 9.71677 5.64517 9.80357 5.11628 9.80357ZM5.11565 8.72045C6.11996 8.72045 6.97038 8.37212 7.6669 7.67545C8.36357 6.97892 8.7119 6.1285 8.7119 5.1242C8.7119 4.11989 8.36357 3.26948 7.6669 2.57295C6.97038 1.87628 6.11996 1.52795 5.11565 1.52795C4.11135 1.52795 3.26093 1.87628 2.5644 2.57295C1.86774 3.26948 1.5194 4.11989 1.5194 5.1242C1.5194 6.1285 1.86774 6.97892 2.5644 7.67545C3.26093 8.37212 4.11135 8.72045 5.11565 8.72045Z",fill:"#009BC9"})})})]}),e.jsxs("div",{className:`flex flex-wrap gap-5 p-5 overflow-y-auto max-h-[calc(90vh-140px)] ${b?"justify-center":"justify-start"}`,children:[!r&&(d||g)&&Array.from({length:4}).map((t,s)=>e.jsx(M,{width:300,height:300,className:"rounded-[12px]"},`administration-skeleton-${s}`)),(r??[]).filter(t=>t==null?void 0:t.name.toLowerCase().includes(l.toLowerCase())).map((t,s)=>e.jsx("div",{className:`w-[300px] h-[300px] relative 2 border border-white dark:border-neutral-800 cursor-pointer hover:border-blue-600 3 rounded-[12px] ${w(s)} dark:bg-neutral-900`,onClick:()=>h(t==null?void 0:t.id),children:e.jsx(A,{data:t,handleAdministrationChange:h})},t.id))]})]})},J=function(){return e.jsx(E,{})};export{J as component}; 4//# sourceMappingURL=index-BUgLRT01.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.