1import{r as c,j as e}from"./index-DZNYWdd6.js";import{M as m}from"./index-C1PNIyiC.js";function r({children:t,tone:a="emerald"}){const l={emerald:"bg-emerald-500/10 text-emerald-700 ring-emerald-600/20",slate:"bg-slate-500/10 text-slate-700 ring-slate-600/20",rose:"bg-rose-500/10 text-rose-700 ring-rose-600/20",amber:"bg-amber-500/10 text-amber-700 ring-amber-600/20"};return e.jsxs("span",{className:["inline-flex items-center gap-1 rounded-full px-2.5 py-1 text-xs font-semibold ring-1",l[a]??l.slate].join(" "),children:[e.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-current opacity-70"}),t]})}function i({label:t,value:a}){return e.jsxs("div",{className:"space-y-1",children:[e.jsx("div",{className:"text-xs font-medium text-slate-500",children:t}),e.jsx("div",{className:"text-sm font-semibold text-slate-900",children:a||"â"})]})}function p(t){if(!t)return"";const a=document.createElement("div");return a.innerHTML=String(t),(a.textContent||"").replace(/\u00A0/g," ").replace(/\s+/g," ").trim()}function g(t=""){return t.trim().replace(/\s+/g,"_")}function j({open:t,onClose:a,profile:l}){const s=l??{};g(s?.name);const n=c.useMemo(()=>!s?.worked_till,[s?.worked_till]),d=n?"emerald":"slate",o=n?"Active":"Not Active",x=c.useMemo(()=>p(s?.message),[s?.message]);return e.jsxs(m,{open:t,onClose:a,size:"xl",titleId:"secretary-modal-title",children:[e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"px-6 py-5",children:e.jsxs("div",{className:"flex items-start justify-between gap-4",children:[e.jsxs("div",{className:"flex items-center gap-4",children:[(s?.picture||s?.image_path)&&e.jsx("img",{src:s?.picture||s?.image_path,alt:s?.name??"Profile",loading:"lazy",className:"h-14 w-14 rounded-2xl object-cover ring-1 ring-slate-200"}),e.jsxs("div",{className:"text-slate-900",children:[e.jsx("h2",{id:"secretary-modal-title",className:"text-lg font-bold tracking-tight",children:s?.name??"â"}),e.jsxs("div",{className:"mt-0.5 text-sm text-slate-600",children:[e.jsx("span",{className:"font-semibold",children:s?.designation||s?.position_type||""}),e.jsx("span",{className:"mx-2 text-slate-300",children:"â¢"}),e.jsx("span",{children:s?.department??"â"})]}),e.jsxs("div",{className:"mt-2 flex flex-wrap gap-2",children:[e.jsx(r,{tone:d,children:o}),s?.bps&&e.jsx(r,{tone:"slate",children:`BPS-${s.bps}`}),s?.cader&&e.jsx(r,{tone:"amber",children:s.cader})]})]})]}),e.jsx("button",{onClick:a,className:"rounded-xl p-2 text-slate-600 hover:bg-slate-100 hover:text-slate-900 focus:outline-none focus:ring-2 focus:ring-slate-300","aria-label":"Close",type:"button",children:e.jsx("svg",{viewBox:"0 0 24 24",className:"h-5 w-5",fill:"none",stroke:"currentColor",strokeWidth:"2",children:e.jsx("path",{d:"M6 6l12 12M18 6L6 18"})})})]})}),e.jsx("div",{className:"h-px bg-slate-200"})]}),e.jsx("div",{className:"max-h-[60vh] overflow-y-auto p-6",children:e.jsxs("div",{className:"grid gap-6 p-6 md:grid-cols-12",children:[e.jsx("div",{className:"md:col-span-3",children:e.jsx("div",{className:"rounded-2xl bg-slate-50 p-5 ring-1 ring-slate-200",children:e.jsxs("div",{className:"space-y-4",children:[e.jsx(i,{label:"Designation",value:s?.designation||s?.position_type||"â"}),e.jsx("div",{className:"h-px bg-slate-200"}),e.jsx(i,{label:"From",value:s?.working_since}),e.jsx("div",{className:"h-px bg-slate-200"}),e.jsx(i,{label:"To",value:s?.worked_till??"Present"})]})})}),e.jsx("div",{className:"md:col-span-9",children:e.jsxs("div",{className:"rounded-2xl bg-white p-5 ring-1 ring-slate-200",children:[e.jsx("h3",{className:"text-lg font-semibold text-slate-900",children:"Details"}),e.jsx("p",{className:"mt-2 text-sm text-slate-700 whitespace-pre-wrap",children:x||"â"})]})})]})}),e.jsxs("div",{className:"flex items-center justify-between gap-2 border-t border-slate-200 bg-white px-6 py-4",children:[e.jsx("div",{}),e.jsx("button",{onClick:a,className:"rounded-xl border border-slate-300 px-4 py-2 text-sm font-semibold text-slate-700 hover:bg-slate-100 focus:outline-none focus:ring-2 focus:ring-slate-400",type:"button",children:"Close"})]})]})}export{j as H};
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.