1import{j as e}from"./app-BeGqF6ux.js";import{b as r}from"./Tooltip-DYcxt1UG.js";import{M as x}from"./Meter-FhTCPCYY.js";import"./index-Dkf2GVy1.js";import"./dayjs-BlgjZc9C.js";import b from"./Card-DimZq4AV.js";import y from"./CopyChip-DtIpiLCL.js";import h from"./LicenseStatusBadge-BwtD6Bwr.js";import{A as l,a as u,c as i,S as c,M as j}from"./licenseManager.helpers-DRmXV-4B.js";import"./button.styles-7lPNyjJO.js";import"./iconBase-CN8tsjra.js";import"./useTranslation-kJHeU9i8.js";import"./helpers-CgA5RTdO.js";import"./useCopied-BNKwja6B.js";function M({license:t,onToggleLicense:o,onEditExpiration:m}){const a=t.isEnabled,p=t.seatsUsed>=t.seatsTotal;return e.jsxs(b,{children:[e.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-4 border-b border-utility-stroke-tertiary px-5 py-4",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2.5",children:[e.jsx("span",{className:"grid h-9 w-9 flex-none place-items-center rounded-lg",style:{background:u,color:l},children:e.jsx(r,{name:"HiBuildingOffice2",size:"sm"})}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("h2",{className:"truncate text-heading-5-bold text-type-black-primary",children:t.name}),e.jsxs("div",{className:"mt-0.5 flex items-center gap-2 text-subtitle-sm text-type-black-tertiary",children:[e.jsx("span",{className:"inline-flex items-center rounded-md bg-surface-base-bg px-2 py-0.5 text-subtitle-sm-bold uppercase tracking-wide text-type-black-secondary",children:t.type}),e.jsx("span",{children:"Ref ID"}),e.jsx("a",{href:`https://renewedvision.com/admin/myrefid.php?ref_id=${encodeURIComponent(t.refId)}`,target:"_blank",rel:"noreferrer",className:"font-bold hover:underline",style:{color:l},children:t.refId})]})]})]}),e.jsxs("div",{className:"mt-3 flex items-center gap-1",children:[e.jsx("span",{className:"select-all font-mono text-paragraph-2-medium text-type-black-secondary",children:t.key}),e.jsx(y,{value:t.key,label:"",ariaLabel:"Copy license key"})]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("span",{className:"inline-flex items-center gap-1.5 rounded-lg border border-utility-stroke-secondary bg-surface-base px-2.5 py-1.5 text-button-small",style:{color:a?i:c},children:[e.jsx("span",{className:"h-1.5 w-1.5 flex-none rounded-full",style:{background:a?i:c}}),a?"Enabled":"Disabled"]}),e.jsxs("button",{type:"button",onClick:o,className:"inline-flex items-center gap-1.5 rounded-lg border border-utility-stroke-secondary bg-surface-base px-2.5 py-1.5 text-button-small transition-colors hover:bg-surface-base-bg",style:{color:a?c:i},children:[e.jsx(r,{name:"HiMiniPower",size:"xs"}),a?"Disable code":"Enable code"]})]})]}),e.jsxs("div",{className:"grid grid-cols-2 divide-x divide-utility-stroke-tertiary sm:grid-cols-4",children:[e.jsxs("div",{className:"px-5 py-3.5",children:[e.jsx("p",{className:"text-subtitle-sm-bold uppercase tracking-wide text-type-black-tertiary",children:"Seats"}),e.jsxs("div",{className:"mt-1 flex items-baseline gap-1",children:[e.jsx("span",{className:"text-heading-4-bold text-type-black-primary",children:t.seatsUsed}),e.jsxs("span",{className:"text-paragraph-2 text-type-black-tertiary",children:["/ ",t.seatsTotal," used"]})]}),e.jsx("div",{className:"mt-2",children:e.jsx(x,{label:"Seats used",hideLabel:!0,min:0,max:Math.max(t.seatsTotal,1),segments:[{value:t.seatsUsed,color:p?j:l}]})}),e.jsxs("p",{className:"mt-1.5 text-subtitle-sm text-type-black-secondary",children:[t.seatsAvailable," available"]})]}),e.jsxs("div",{className:"px-5 py-3.5",children:[e.jsx("p",{className:"text-subtitle-sm-bold uppercase tracking-wide text-type-black-tertiary",children:"Maintenance"}),e.jsx("div",{className:"mt-1.5",children:e.jsx(h,{status:t.maintenanceStatus})}),e.jsxs("button",{type:"button",onClick:m,className:"mt-2 inline-flex items-center gap-1.5 text-subtitle-bold text-type-black-secondary transition-colors hover:text-type-black-primary",children:[e.jsx(r,{name:"HiCalendarDays",size:"xs",className:"text-type-black-tertiary"}),t.maintenanceExpiration,e.jsx(r,{name:"HiPencil",size:"xs",className:"text-type-black-tertiary"})]})]}),e.jsxs("div",{className:"px-5 py-3.5",children:[e.jsx("p",{className:"text-subtitle-sm-bold uppercase tracking-wide text-type-black-tertiary",children:"Last launched"}),e.jsxs("div",{className:"mt-1.5 flex items-start gap-1.5",children:[e.jsx(r,{name:"HiClock",size:"xs",className:"mt-0.5 flex-none text-type-black-tertiary"}),e.jsx("span",{className:"text-paragraph-2-bold text-type-black-primary",children:t.lastLaunched??"No info available yet"})]})]}),e.jsxs("div",{className:"px-5 py-3.5",children:[e.jsx("p",{className:"text-subtitle-sm-bold uppercase tracking-wide text-type-black-tertiary",children:"Latest version"}),e.jsx("div",{className:"mt-1 flex items-baseline gap-1",children:t.latestRelease?e.jsx("a",{href:"https://renewedvision.com/propresenter/release-notes/",target:"_blank",rel:"noreferrer",className:"text-heading-4-bold hover:underline",style:{color:l},children:t.latestRelease}):e.jsx("span",{className:"text-heading-4-bold text-type-black-primary",children:"â"})}),e.jsx("p",{className:"mt-1.5 text-subtitle-sm text-type-black-secondary",children:"available to this customer"})]})]}),t.autoRenewals.length>0&&e.jsxs("div",{className:"border-t border-utility-stroke-tertiary px-5 py-3.5",children:[e.jsx("p",{className:"text-subtitle-sm-bold uppercase tracking-wide text-type-black-tertiary",children:"Auto-renewal"}),e.jsx("ul",{className:"mt-1.5 flex flex-col gap-1",children:t.autoRenewals.map((s,d)=>{const n=s.status==="active";return e.jsxs("li",{className:"flex items-center gap-2 text-paragraph-2-medium",children:[e.jsx("span",{className:"h-1.5 w-1.5 flex-none rounded-full",style:{background:n?i:c}}),e.jsx("span",{style:{color:n?i:c},children:n?"Active":"Deactivated"}),s.dateCreated&&e.jsxs("span",{className:"text-type-black-tertiary",children:["(",s.dateCreated,")"]}),n&&s.customerId&&e.jsx("a",{href:`https://renewedvision.com/stripe/create-portal-session.php?customer=${encodeURIComponent(s.customerId)}`,target:"_blank",rel:"noreferrer",className:"font-bold hover:underline",style:{color:l},"aria-label":`Manage renewal for Stripe customer ${s.customerId}`,children:"manage"})]},`${s.customerId}-${d}`)}
1)})]}),t.notes.length>0&&e.jsxs("div",{className:"border-t border-utility-stroke-tertiary px-5 py-3.5",children:[e.jsx("p",{className:"text-subtitle-sm-bold uppercase tracking-wide text-type-black-tertiary",children:"Notes"}),e.jsx("ul",{className:"mt-1.5 flex flex-col gap-1",children:t.notes.map((s,d)=>e.jsxs("li",{className:"text-paragraph-2 text-type-black-secondary",children:[e.jsxs("span",{className:"text-type-black-tertiary",children:[s.date,":"]})," ",e.jsx("span",{className:"font-bold text-type-black-primary",children:s.username})," â"," ",s.text]},`${s.date}-${s.username}-${d}`))})]})]})}export{M as default};
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.