1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5376],{85420:(e,t,s)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/client-management/[clientId]",function(){return s(54465)}])},7216:(e,t,s)=>{"use strict";s.d(t,{A:()=>a});let a=(0,s(86899).A)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]])},25855:(e,t,s)=>{"use strict";s.d(t,{A:()=>a});let a=(0,s(86899).A)("coins",[["circle",{cx:"8",cy:"8",r:"6",key:"3yglwk"}],["path",{d:"M18.09 10.37A6 6 0 1 1 10.34 18",key:"t5s6rm"}],["path",{d:"M7 6h1v4",key:"1obek4"}],["path",{d:"m16.71 13.88.7.71-2.82 2.82",key:"1rbuyh"}]])},29291:(e,t,s)=>{"use strict";s.d(t,{A:()=>a});let a=(0,s(86899).A)("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]])},1321:(e,t,s)=>{"use strict";s.d(t,{A:()=>a});let a=(0,s(86899).A)("minus",[["path",{d:"M5 12h14",key:"1ays0h"}]])},40773:(e,t,s)=>{"use strict";s.d(t,{A:()=>a});let a=(0,s(86899).A)("phone",[["path",{d:"M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384",key:"9njp5v"}]])},98097:(e,t,s)=>{"use strict";s.d(t,{A:()=>a});let a=(0,s(86899).A)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]])},9910:(e,t,s)=>{"use strict";s.d(t,{A:()=>a});let a=(0,s(86899).A)("user",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]])},54465:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>D});var a=s(74848),l=s(84117),n=s(96540),r=s(88153),d=s(64721),i=s(86715),c=s(44034),x=s(94909),o=s(82705),m=s(31006),p=s(25855),h=s(46715),g=s(95438),u=s(7216),y=s(9910),j=s(96010),b=s(40773),N=s(4029),f=s(79508),v=s(29291),w=s(82995),k=s(76897),A=s(98097),C=s(1321);let S=e=>e?new Date(e).toLocaleDateString("en-IN",{day:"2-digit",month:"short",year:"numeric"}):"N/A",T=[{id:"overview",label:"Overview",icon:c.A},{id:"team",label:"Team Members",icon:x.A},{id:"jobs",label:"Jobs",icon:o.A},{id:"interviews",label:"AI Interviews",icon:m.A},{id:"credits",label:"Credits",icon:p.A},{id:"activity",label:"Activity",icon:h.A}],P=()=>{var e,t,s,l,o,h,P,I,D,L,R,_,E,M,U,F,B,W,V,H,q,z,J;let O=(0,i.useRouter)(),{clientId:G}=O.query,[Q,X]=(0,n.useState)(null),[Y,K]=(0,n.useState)(!0),[Z,$]=(0,n.useState)("overview"),[ee,et]=(0,n.useState)([]),[es,ea]=(0,n.useState)(!1),[el,en]=(0,n.useState)(!1),[er,ed]=(0,n.useState)("CREDIT"),[ei,ec]=(0,n.useState)(""),[ex,eo]=(0,n.useState)(""),[em,ep]=(0,n.useState)(!1),[eh,eg]=(0,n.useState)(null),[eu,ey]=(0,n.useState)([]),[ej,eb]=(0,n.useState)(!1),[eN,ef]=(0,n.useState)(null),[ev,ew]=(0,n.useState)(!1),[ek,eA]=(0,n.use
1State)(null),[eC,eS]=(0,n.useState)(!1),[eT,eP]=(0,n.useState)(!1),[eI,eD]=(0,n.useState)(null),eL=(0,n.useCallback)(async()=>{if(G)try{var e,t,s,a;let l=await r.default.get("/contribution-admin/companies/".concat(G,"/credits/summary")),n=null===(e=l.data)||void 0===e?void 0:e.data;eg(null!==(a=null!==(s=null==n?void 0:n.balance)&&void 0!==s?s:null==n?void 0:null===(t=n.wallet)||void 0===t?void 0:t.balance)&&void 0!==a?a:null),ew(!!(null==n?void 0:n.unlimitedResumeParses)),eA("number"==typeof(null==n?void 0:n.freeResumeParses)?n.freeResumeParses:null)}catch(e){}},[G]),eR=async()=>{let e=Number(ei);if(!e||e<=0){d.toast.error("Enter a valid quantity");return}ep(!0);try{await r.default.post("/contribution-admin/companies/".concat(G,"/credits/adjust"),{type:er,quantity:e,reason:ex||"SA ".concat(er.toLowerCase()," via admin panel")}),d.toast.success("".concat(e," credit(s) ").concat("CREDIT"===er?"added":"deducted"," successfully")),en(!1),ec(""),eo(""),eL()}catch(e){var t,s;d.toast.error((null==e?void 0:null===(s=e.response)||void 0===s?void 0:null===(t=s.data)||void 0===t?void 0:t.message)||"Failed to adjust credits")}ep(!1)},e_=async()=>{let e=!ev;eS(!0);try{await r.default.post("/contribution-admin/companies/".concat(G,"/parsing/unlimited"),{enabled:e}),ew(e),d.toast.success(e?"Unlimited CV parsing granted â this client is no longer charged for AI parsing":"Unlimited CV parsing revoked â standard â¹/CV charges now apply"),eL()}catch(e){var t,s;d.toast.error((null==e?void 0:null===(s=e.response)||void 0===s?void 0:null===(t=s.data)||void 0===t?void 0:t.message)||"Failed to update parsing access")}eS(!1)},eE=(0,n.useCallback)(async()=>{if(G){try{var e;let t=await r.default.get("/admin-client/admin-clients/".concat(G));X((null===(e=t.data)||void 0===e?void 0:e.data)||null)}catch(e){d.toast.error("Failed to load company")}K(!1)}},[G]);(0,n.useEffect)(()=>{eE(),eL()},[eE,eL]),(0,n.useEffect)(()=>{"jobs"===Z&&G&&(eb(!0),r.default.get("/admin-job/admin-jobs/by-company/".concat(G)).then(e=>{var t;return ey((null===(t=e.data)||void 0===t?void 0:t.data)||[])}).catch(()=>ey([])).finally(()=>eb(!1)))},[Z,G]),(0,n.useEffect)(()=>{"credits"===Z&&G&&(eP(!0),r.default.get("/admin-client/admin-clients/".concat(G,"/credits-overview")).then(e=>{var t;return ef((null===(t=e.data)||void 0===t?void 0:t.data)||null)}).catch(()=>ef(null)).finally(()=>eP(!1)))},[Z,G]),(0,n.useEffect)(()=>{"activity"===Z&&G&&r.default.get("/admin-client/admin-clients/".concat(G,"/candidate-stats")).then(e=>{var t;return eD((null===(t=e.data)||void 0===t?void 0:t.data)||null)}).catch(()=>eD(null))},[Z,G]),(0,n.useEffect)(()=>{"interviews"===Z&&G&&(ea(!0),r.default.get("/admin-client/admin-clients/".concat(G,"/interviews")).then(e=>{var t;return et((null===(t=e.data)||void 0===t?void 0:t.data)||[])}).catch(()=>et([])).finally(()=>ea(!1)))},[Z,G]);let eM=async(e,t)=>{try{var s,a;let l=await r.default.post("/admin-client/admin-clients/".concat(G,"/proxy-login"),{email:e}),n=null===(a=l.data)||void 0===a?void 0:null===(s=a.data)||void 0===s?void 0:s.token;n&&(window.open("".concat(window.location.origin,"/proxy-login?token=").concat(n),"_blank"),d.toast.success("Proxy login opened as ".concat(t)))}catch(e){d.toast.error("Failed to proxy login as ".concat(t))}},eU=async()=>{try{var e,t,s,a;let l=await r.default.post("/admin-client/admin-clients/".concat(G,"/proxy-login")),n=null===(t=l.data)||void 0===t?void 0:null===(e=t.data)||void 0===e?void 0:e.token;n&&(window.open("".concat(window.location.origin,"/proxy-login?token=").concat(n),"_blank"),d.toast.success("Proxy URL opened. Logging in as ".concat(null===(a=l.data)||void 0===a?void 0:null===(s=a.data)||void 0===s?void 0:s.email)))}catch(e){d.toast.error("Failed to generate proxy login")}};if(Y)return(0,a.jsxs)("div",{className:"space-y-6",children:[(0,a.jsx)("h1",{className:"text-2xl font-semibold text-gray-900",children:"Client Management"}),(0,a.jsx)("div",{className:"flex justify-center py-20",children:(0,a.jsx)(g.A,{className:"w-6 h-6 animate-spin text-blue-600"})})]});if(!Q)return(0,a.jsxs)("div",{className:"space-y-6",children:[(0,a.jsx)("h1",{className:"text-2xl font-semibold text-gray-900",children:"Client Management"}),(0,a.jsx)("div",{className:"text-center py-20 text-gray-500",children:"Company not found"})]});let eF=Q.teamMembers||[];return(0,a.jsxs)("div",{className:"space-y-6",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("button",{onClick:()=>O.push("/admin/client-management"),className:"flex items-center gap-1 text-blue-600 hover:text-blue-800 text-sm font-medium",children:[(0,a.jsx)(u.A,{className:"w-4 h-4"})," BACK"]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[null!==eh&&(0,a.jsxs)("span",{className:"flex items-center gap-1.5 bg-amber-50 border border-amber-200 text-amber-700 px-3 py-2 rounded-lg text-sm font-medium",children:[(0,a.jsx)(p.A,{className:"w-4 h-4"})," ",eh," credits"]}),(0,a.jsxs)("button",{onClick:()=>{ed("CREDIT"),en(!0)},className:"flex items-center gap-1.5 bg-green-600 text-white px-4 py-2 rounded-lg text-sm font-medium hover:bg-green-700",children:[(0,a.jsx)(p.A,{className:"w-4 h-4"})," Grant Credits"]}),(0,a.jsxs)("button",{onClick:eU,className:"flex items-center gap-1.5 bg-purple-600 text-white px-4 py-2 rounded-lg text-sm font-medium hover:bg-purple-700",children:[(0,a.jsx)(y.A,{className:"w-4 h-4"})," Proxy Login"]})]})]}),(0,a.jsxs)("div",{className:"bg-white rounded-xl border p-6",children:[(0,a.jsxs)("div",{className:"flex items-start gap-4",children:[Q.companyLogo?(0,a.jsx)("img",{src:Q.companyLogo,className:"w-16 h-16 rounded-xl object-cover border",alt:""}):(0,a.jsx)("div",{className:"w-16 h-16 rounded-xl bg-blue-100 flex items-center justify-center",children:(0,a.jsx)(c.A,{className:"w-8 h-8 text-blue-600"})}),(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsx)("h2",{className:"text-xl font-bold text-gray-900",children:Q.companyName||"Unnamed Company"}),Q.industry&&(0,a.jsx)("p",{className:"text-gray-500",children:Q.industry}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-4 mt-2 text-sm text-gray-500",children:[Q.companyEmail&&(0,a.jsxs)("span",{className:"flex items-center gap-1",children:[(0,a.jsx)(j.A,{className:"w-3.5 h-3.5"}),Q.companyEmail]}
1),Q.companyMobile&&(0,a.jsxs)("span",{className:"flex items-center gap-1",children:[(0,a.jsx)(b.A,{className:"w-3.5 h-3.5"}),Q.companyMobile]}),(Q.companyCity||Q.companyCountry)&&(0,a.jsxs)("span",{className:"flex items-center gap-1",children:[(0,a.jsx)(N.A,{className:"w-3.5 h-3.5"}),[Q.companyCity,Q.companyState,Q.companyCountry].filter(Boolean).join(", ")]}),Q.companyWebsite&&(0,a.jsxs)("a",{href:Q.companyWebsite,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 text-blue-600 hover:underline",children:[(0,a.jsx)(f.A,{className:"w-3.5 h-3.5"}),Q.companyWebsite]})]})]})]}),(0,a.jsxs)("div",{className:"grid grid-cols-2 md:grid-cols-5 gap-4 mt-6 pt-4 border-t text-sm",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"text-gray-400 block",children:"Registered"}),(0,a.jsx)("span",{className:"font-medium",children:S(Q.createdAt)})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"text-gray-400 block",children:"Team Members"}),(0,a.jsx)("span",{className:"font-medium",children:eF.length})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"text-gray-400 block",children:"Jobs Posted"}
1),(0,a.jsx)("span",{className:"font-medium",children:Q.jobCount||0})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"text-gray-400 block",children:"Company Size"}),(0,a.jsx)("span",{className:"font-medium",children:Q.companySize||"-"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"text-gray-400 block",children:"Founded"}),(0,a.jsx)("span",{className:"font-medium",children:Q.foundedYear||"-"})]})]})]}),(0,a.jsxs)("div",{className:"bg-white rounded-xl border overflow-hidden",children:[(0,a.jsx)("div",{className:"border-b overflow-x-auto",children:(0,a.jsx)("div",{className:"flex min-w-max",children:T.map(e=>(0,a.jsxs)("button",{onClick:()=>$(e.id),className:"flex items-center gap-1.5 px-4 py-3 text-sm font-medium border-b-2 transition-colors whitespace-nowrap ".concat(Z===e.id?"border-blue-600 text-blue-600":"border-transparent text-gray-500 hover:text-gray-700"),children:[(0,a.jsx)(e.icon,{className:"w-4 h-4"})," ",e.label]},e.id))})}),(0,a.jsxs)("div",{className:"p-6",children:["overview"===Z&&(0,a.jsxs)("div",{className:"space-y-6",children:[Q.companyAbout&&(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"text-lg font-semibold text-gray-800 mb-2",children:"About"}),(0,a.jsx)("div",{className:"text-sm text-gray-600 prose prose-sm max-w-none",dangerouslySetInnerHTML:{__html:Q.companyAbout}})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"text-lg font-semibold text-gray-800 mb-3",children:"Company Details"}),(0,a.jsx)("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-4 text-sm",children:[["Company Name",Q.companyName],["Email",Q.companyEmail],["Phone",Q.companyMobile],["Industry",Q.industry],["Company Size",Q.companySize],["Founded",Q.foundedYear],["Website",Q.companyWebsite],["City",Q.companyCity],["State",Q.companyState],["Country",Q.companyCountry],["Address",Q.companyAddress],["GST/Tax ID",Q.gstNumber||Q.taxId||"-"]].map((e,t)=>{let[s,l]=e;return(0,a.jsxs)("div",{className:"bg-gray-50 rounded-lg p-3",children:[(0,a.jsx)("span",{className:"text-gray-400 block mb-1",children:s}),(0,a.jsx)("span",{className:"font-medium text-gray-800",children:l||"-"})]},t)})})]}),(Q.socialLinks||Q.companyLinkedin||Q.companyFacebook)&&(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"text-lg font-semibold text-gray-800 mb-3",children:"Social Links"}),(0,a.jsxs)("div",{className:"flex flex-wrap gap-3",children:[((null===(e=Q.socialLinks)||void 0===e?void 0:e.linkedin)||Q.companyLinkedin)&&(0,a.jsxs)("a",{href:(null===(t=Q.socialLinks)||void 0===t?void 0:t.linkedin)||Q.companyLinkedin,target:"_blank",rel:"noopener noreferrer",className:"text-sm text-blue-600 hover:underline flex items-center gap-1",children:[(0,a.jsx)(v.A,{className:"w-3 h-3"}),"LinkedIn"]}),((null===(s=Q.socialLinks)||void 0===s?void 0:s.facebook)||Q.companyFacebook)&&(0,a.jsxs)("a",{href:(null===(l=Q.socialLinks)||void 0===l?void 0:l.facebook)||Q.companyFacebook,target:"_blank",rel:"noopener noreferrer",className:"text-sm text-blue-600 hover:underline flex items-center gap-1",children:[(0,a.jsx)(v.A,{className:"w-3 h-3"}),"Facebook"]}),((null===(o=Q.socialLinks)||void 0===o?void 0:o.twitter)||Q.companyTwitter)&&(0,a.jsxs)("a",{href:(null===(h=Q.socialLinks)||void 0===h?void 0:h.twitter)||Q.companyTwitter,target:"_blank",rel:"noopener noreferrer",className:"text-sm text-blue-600 hover:underline flex items-center gap-1",children:[(0,a.jsx)(v.A,{className:"w-3 h-3"}),"Twitter"]}),(null===(P=Q.socialLinks)||void 0===P?void 0:P.instagram)&&(0,a.jsxs)("a",{href:Q.socialLinks.instagram,target:"_blank",rel:"noopener noreferrer",className:"text-sm text-blue-600 hover:underline flex items-center gap-1",children:[(0,a.jsx)(v.A,{className:"w-3 h-3"}),"Instagram"]})]})]}),(null===(I=Q.managementTeam)||void 0===I?void 0:I.length)>0&&(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"text-lg font-semibold text-gray-800 mb-3",children:"Management Team"}),(0,a.jsx)("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-3",children:Q.managementTeam.map((e,t)=>{var s;return(0,a.jsxs)("div",{className:"border rounded-lg p-3 flex items-center gap-3",children:[(0,a.jsx)("div",{className:"w-10 h-10 rounded-full bg-gray-100 flex items-center justify-center text-sm font-bold text-gray-600",children:((null===(s=e.name)||void 0===s?void 0:s[0])||"?").toUpperCase()}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium text-sm text-gray-800",children:e.name}),(0,a.jsx)("p",{className:"text-xs text-gray-400",children:e.designation})]})]},t)})})]}),(null===(D=Q.perks)||void 0===D?void 0:D.length)>0&&(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"text-lg font-semibold text-gray-800 mb
1-3",children:"Perks & Benefits"}),(0,a.jsx)("div",{className:"flex flex-wrap gap-2",children:Q.perks.map((e,t)=>(0,a.jsx)("span",{className:"px-3 py-1.5 bg-green-50 text-green-700 rounded-full text-sm border border-green-200",children:e.name||e},t))})]})]}),"team"===Z&&(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"flex items-center justify-between mb-4",children:(0,a.jsxs)("h3",{className:"text-lg font-semibold text-gray-800",children:["Team Members (",eF.length,")"]})}),0===eF.length?(0,a.jsx)("p",{className:"text-gray-500",children:"No team members found"}):(0,a.jsx)("div",{className:"border rounded-lg overflow-hidden",children:(0,a.jsxs)("table",{className:"w-full text-sm",children:[(0,a.jsx)("thead",{className:"bg-gray-50 border-b",children:(0,a.jsxs)("tr",{children:[(0,a.jsx)("th",{className:"text-left px-4 py-2.5 font-medium text-gray-600",children:"Name"}),(0,a.jsx)("th",{className:"text-left px-4 py-2.5 font-medium text-gray-600",children:"Email"}),(0,a.jsx)("th",{className:"text-left px-4 py-2.5 font-medium text-gray-600",children:"Phone"}),(0,a.jsx)("th",{className:"text-left px-4 py-2.5 font-medium text-gray-600",children:"Role"}),(0,a.jsx)("th",{className:"text-left px-4 py-2.5 font-medium text-gray-600",children:"Designation"}),(0,a.jsx)("th",{className:"text-left px-4 py-2.5 font-medium text-gray-600",children:"Status"}),(0,a.jsx)("th",{className:"text-left px-4 py-2.5 font-medium text-gray-600",children:"Last Active"}),(0,a.jsx)("th",{className:"text-left px-4 py-2.5 font-medium text-gray-600",children:"Joined"}),(0,a.jsx)("th",{className:"text-left px-4 py-2.5 font-medium text-gray-600",children:"Actions"})]})}),(0,a.jsx)("tbody",{className:"divide-y",children:eF.map(e=>{var t,s;return(0,a.jsxs)("tr",{className:"hover:bg-gray-50",children:[(0,a.jsx)("td",{className:"px-4 py-3",children:(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("div",{className:"w-8 h-8 rounded-full bg-blue-100 flex items-center justify-center text-xs font-bold text-blue-600",children:((null===(t=e.name)||void 0===t?void 0:t[0])||(null===(s=e.email)||void 0===s?void 0:s[0])||"?").toUpperCase()}),(0,a.jsx)("span",{className:"font-medium",children:e.name||"-"})]})}),(0,a.jsx)("td",{className:"px-4 py-3 text-gray-500",children:e.email}),(0,a.jsx)("td",{className:"px-4 py-3 text-gray-500 text-xs",children:e.phoneNumber?"".concat(e.countryCode||"").concat(e.phoneNumber):"-"}),(0,a.jsx)("td",{className:"px-4 py-3",children:(0,a.jsx)("span",{className:"px-2 py-0.5 rounded-full text-xs font-medium ".concat("admin"===e.role?"bg-purple-100 text-purple-700":"bg-gray-100 text-gray-600"),children:e.role||"user"})}),(0,a.jsx)("td",{className:"px-4 py-3 text-gray-500 text-xs",children:e.designation||"-"}),(0,a.jsxs)("td",{className:"px-4 py-3",children:[(0,a.jsx)("span",{className:"w-2 h-2 rounded-full inline-block mr-1.5 ".concat(!1!==e.isActive?"bg-green-500":"bg-gray-300")}),(0,a.jsx)("span",{className:"text-xs",children:!1!==e.isActive?"Active":"Inactive"})]}),(0,a.jsx)("td",{className:"px-4 py-3 text-xs text-gray-500",children:S(e.lastActiveAt||e.updatedAt)}),(0,a.jsx)("td",{className:"px-4 py-3 text-xs text-gray-500",children:S(e.createdAt)}),(0,a.jsx)("td",{className:"px-4 py-3",children:(0,a.jsxs)("button",{onClick:()=>eM(e.email,e.name||e.email),className:"flex items-center gap-1 text-xs text-purple-600 hover:text-purple-800 hover:bg-purple-50 px-2 py-1 rounded font-medium",title:"Proxy login as ".concat(e.email),children:[(0,a.jsx)(y.A,{className:"w-3 h-3"})," Login"]})})]},e._id)})})]})})]}),"jobs"===Z&&(0,a.jsxs)("div",{children:[(0,a.jsxs)("h3",{className:"text-lg font-semibold text-gray-800 mb-4",children:["Jobs (",eu.length,")"]}),ej?(0,a.jsx)("div",{className:"flex justify-center py-12",children:(0,a.jsx)(g.A,{className:"w-5 h-5 animate-spin text-blue-600"})}):0===eu.length?(0,a.jsx)("p",{className:"text-gray-500",children:"No jobs posted by this client"}):(0,a.jsx)("div",{className:"border rounded-lg overflow-hidden",children:(0,a.jsxs)("table",{className:"w-full text-sm",children:[(0,a.jsx)("thead",{className:"bg-gray-50 border-b",children:(0,a.jsxs)("tr",{children:[(0,a.jsx)("th",{className:"text-left px-4 py-2.5 font-medium text-gray-600",children:"Job Title"}),(0,a.jsx)("th",{className:"text-left px-4 py-2.5 font-medium text-gray-600",children:"Location"}),(0,a.jsx)("th",{className:"text-left px-4 py-2.5 font-medium text-gray-600",children:"Skills"}),(0,a.jsx)("th",{className:"text-center px-4 py-2.5 font-medium text-gray-600",children:"Applicants"}),(0,a.jsx)("th",{className:"text-center px-4 py-2.5 font-medium text-gray-600",children:"Matched"}),(0,a.jsx)("th",{className:"text-left px-4 py-2.5 font-medium text-gray-600",children:"Status"}),(0,a.jsx)("th",{className:"text-left px-4 py-2.5 font-medium text-gray-600",children:"Posted"})]})}),(0,a.jsx)("tbody",{className:"divide-y",children:eu.map(e=>(0,a.jsxs)("tr",{className:"hover:bg-gray-50",children:[(0,a.jsxs)("td",{className:"px-4 py-3",children:[(0,a.jsx)("a",{href:"/job-detail/".concat(e.slug),target:"_blank",rel:"noopener noreferrer",className:"font-medium text-blue-600 hover:underline",children:e.jobTitle}),(0,a.jsxs)("p",{className:"text-xs text-gray-400 mt-0.5",children:[e.employmentType||"",e.workMode?" / ".concat(e.workMode):""]})]}),(0,a.jsx)("td",{className:"px-4 py-3 text-gray-500 text-xs",children:(e.jobLocation||[]).join(", ")||"-"}),(0,a.jsx)("td",{className:"px-4 py-3",children:(0,a.jsxs)("div",{className:"flex flex-wrap gap-1",children:[(e.jobSkill||[]).slice(0,3).map((e,t)=>(0,a.jsx)("span",{className:"px-1.5 py-0.5 bg-blue-50 text-blue-700 rounded text-xs",children:e.title},t)),(e.jobSkill||[]).length>3&&(0,a.jsxs)("span",{className:"text-xs text-gray-400",children:["+",e.jobSkill.length-3]})]})}),(0,a.jsx)("td",{className:"px-4 py-3 text-center text-gray-600",children:e.applicantCount||0}),(0,a.jsx)("td",{className:"px-4 py-3 text-center text-gray-600",children:e.matchedCandidateCount||0}),(0,a.jsx)("td",{className:"px-4 py-3",children:(0,a.jsx)("span",{className:"px-2 py-0.5 rounded-full text-xs font-medium ".concat("active"===e.jobStatus?"bg-green-100 text-green-700":"draft"===e.jobStatus?"bg-yellow-100 text-yellow-700":"bg-red-100 text-red-700"),children:e.jobStatus})}),(0,a.jsx)("td",{className:"px-4 py-3 text-xs text-gray-500",children:e.createdAt?new Date(e.createdAt).toLocaleDateString("en-IN",{day:"2-digit",month:"short",year:"numeric"}):"-"})]},e._id))})]})})]}
1),"interviews"===Z&&(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"text-lg font-semibold text-gray-800 mb-4",children:"AI Interviews"}),es?(0,a.jsx)("div",{className:"flex justify-center py-12",children:(0,a.jsx)(g.A,{className:"w-5 h-5 animate-spin text-blue-600"})}):0===ee.length?(0,a.jsx)("p",{className:"text-gray-500",children:"No AI interviews created by this client"}):(0,a.jsxs)("div",{className:"space-y-6",children:[(0,a.jsxs)("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4 text-sm",children:[(0,a.jsxs)("div",{className:"bg-blue-50 rounded-lg p-4 text-center",children:[(0,a.jsx)("span",{className:"text-2xl font-bold text-blue-600",children:ee.length}),(0,a.jsx)("span",{className:"block text-gray-500 mt-1",children:"Total Invitations"})]}),(0,a.jsxs)("div",{className:"bg-green-50 rounded-lg p-4 text-center",children:[(0,a.jsx)("span",{className:"text-2xl font-bold text-green-600",children:ee.filter(e=>"active"===e.status).length}),(0,a.jsx)("span",{className:"block text-gray-500 mt-1",children:"Active"})]}),(0,a.jsxs)("div",{className:"bg-purple-50 rounded-lg p-4 text-center",children:[(0,a.jsx)("span",{className:"text-2xl font-bold text-purple-600",children:ee.filter(e=>"completed"===e.status).length}),(0,a.jsx)("span",{className:"block text-gray-500 mt-1",children:"Completed"})]}),(0,a.jsxs)("div",{className:"bg-gray-50 rounded-lg p-4 text-center",children:[(0,a.jsx)("span",{className:"text-2xl font-bold text-gray-600",children:ee.filter(e=>"draft"===e.status).length}),(0,a.jsx)("span",{className:"block text-gray-500 mt-1",children:"Drafts"})]})]}),(0,a.jsx)("div",{className:"border rounded-lg overflow-hidden",children:(0,a.jsxs)("table",{className:"w-full text-sm",children:[(0,a.jsx)("thead",{className:"bg-gray-50 border-b",children:(0,a.jsxs)("tr",{children:[(0,a.jsx)("th",{className:"text-left px-4 py-2.5 font-medium text-gray-600",children:"Job Title"}),(0,a.jsx)("th",{className:"text-left px-4 py-2.5 font-medium text-gray-600",children:"Type"}),(0,a.jsx)("th",{className:"text-left px-4 py-2.5 font-medium text-gray-600",children:"Status"}),(0,a.jsx)("th",{className:"text-left px-4 py-2.5 font-medium text-gray-600",children:"Candidates"}),(0,a.jsx)("th",{className:"text-left px-4 py-2.5 font-medium text-gray-600",children:"Created By"}),(0,a.jsx)("th",{className:"text-left px-4 py-2.5 font-medium text-gray-600",children:"Created"}),(0,a.jsx)("th",{className:"text-left px-4 py-2.5 font-medium text-gray-600",children:"Expires"})]})}),(0,a.jsx)("tbody",{className:"divide-y",children:ee.map(e=>{var t,s,l,n;let r="precision"===e.interviewType?(null===(t=e.precisionQuestions)||void 0===t?void 0:t.length)||0:(null===(s=e.candidates)||void 0===s?void 0:s.length)||0;return(0,a.jsxs)("tr",{className:"hover:bg-gray-50",children:[(0,a.jsx)("td",{className:"px-4 py-3",children:(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(m.A,{className:"w-4 h-4 text-purple-400"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"font-medium text-gray-800",children:e.interviewTitle||(null===(l=e.jobSnapshot)||void 0===l?void 0:l.jobTitle)||"Untitled"}),(null===(n=e.jobSnapshot)||void 0===n?void 0:n.jobRole)&&(0,a.jsx)("p",{className:"text-xs text-gray-400 truncate max-w-[200px]",children:e.jobSnapshot.jobRole})]})]})}),(0,a.jsx)("td",{className:"px-4 py-3",children:(0,a.jsx)("span",{className:"px-2 py-0.5 rounded-full text-xs font-medium ".concat("precision"===e.interviewType?"bg-purple-100 text-purple-700":"bg-blue-100 text-blue-700"),children:"precision"===e.interviewType?"Precision":"Volume"})}),(0,a.jsx)("td",{className:"px-4 py-3",children:(0,a.jsx)("span",{className:"px-2 py-0.5 rounded-full text-xs font-medium capitalize ".concat({draft:"bg-gray-100 text-gray-600",active:"bg-green-100 text-green-700",completed:"bg-blue-100 text-blue-700",cancelled:"bg-red-100 text-red-700"}[e.status]||"bg-gray-100 text-gray-600"),children:e.status})}),(0,a.jsx)("td",{className:"px-4 py-3",children:(0,a.jsxs)("span",{className:"flex items-center gap-1 text-gray-600",children:[(0,a.jsx)(x.A,{className:"w-3.5 h-3.5"}),r]})}),(0,a.jsx)("td",{className:"px-4 py-3 text-xs text-gray-500",children:e.createdBySnapshot?"".concat(e.createdBySnapshot.firstName||""," ").concat(e.createdBySnapshot.lastName||"").trim():"-"}),(0,a.jsx)("td",{className:"px-4 py-3 text-xs text-gray-500",children:S(e.createdAt)}),(0,a.jsx)("td",{className:"px-4 py-3 text-xs text-gray-500",children:e.expiry_time?S(e.expiry_time):"-"})]},e._id)})})]})})]})]}),"credits"===Z&&(0,a.jsxs)("div",{className:"space-y-6",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"text-lg font-semibold text-gray-800 mb
1-3",children:"CV Parsing Access"}),(0,a.jsxs)("div",{className:"border rounded-lg p-4 flex items-start justify-between gap-4 flex-wrap",children:[(0,a.jsxs)("div",{className:"min-w-[260px]",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(w.A,{className:"w-4 h-4 text-gray-500"}),(0,a.jsx)("span",{className:"font-medium text-gray-800",children:ev?"Unlimited CV parsing":"Standard CV parsing"}),ev&&(0,a.jsx)("span",{className:"text-xs font-semibold px-2 py-0.5 rounded-full bg-green-100 text-green-700",children:"GRANTED"})]}),(0,a.jsx)("p",{className:"text-sm text-gray-500 mt-1.5",children:ev?"AI resume parsing is never charged for this client and the free allowance is not consumed.":(0,a.jsxs)(a.Fragment,{children:["First 50 CV parses are free, then the standard per-CV charge applies from the wallet.",null!==ek&&(0,a.jsxs)(a.Fragment,{children:[" ",(0,a.jsxs)("span",{className:"text-gray-700 font-medium",children:[ek," free parse",1===ek?"":"s"," left."]})]})]})})]}),(0,a.jsx)("button",{onClick:e_,disabled:eC,className:"px-4 py-2 rounded-lg text-sm font-medium transition-colors disabled:opacity-60 ".concat(ev?"bg-white border border-red-300 text-red-600 hover:bg-red-50":"bg-blue-600 text-white hover:bg-blue-700"),children:eC?"Savingâ¦":ev?"Revoke unlimited":"Grant unlimited"})]})]}),eT?(0,a.jsx)("div",{className:"flex justify-center py-12",children:(0,a.jsx)(g.A,{className:"w-6 h-6 animate-spin text-blue-500"})}):eN?(0,a.jsxs)("div",{className:"space-y-6",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"text-lg font-semibold text-gray-800 mb-3",children:"Company Wallet"}),(0,a.jsxs)("div",{className:"grid grid-cols-2 md:grid-cols-5 gap-3",children:[(0,a.jsxs)("div",{className:"bg-blue-50 rounded-lg p-3 text-center",children:[(0,a.jsx)("span",{className:"text-2xl font-bold text-blue-700",children:(null===(L=eN.companyWallet)||void 0===L?void 0:L.balance)||0}),(0,a.jsx)("span",{className:"block text-xs text-gray-500 mt-1",children:"Balance"})]}),(0,a.jsxs)("div",{className:"bg-green-50 rounded-lg p-3 text-center",children:[(0,a.jsx)("span",{className:"text-2xl font-bold text-green-700",children:(null===(R=eN.companyWallet)||void 0===R?void 0:R.totalEarned)||0}),(0,a.jsx)("span",{className:"block text-xs text-gray-500 mt-1",children:"Total Earned"})]}),(0,a.jsxs)("div",{className:"bg-red-50 rounded-lg p-3 text-center",children:[(0,a.jsx)("span",{className:"text-2xl font-bold text-red-700",children:(null===(_=eN.companyWallet)||void 0===_?void 0:_.totalSpent)||0}),(0,a.jsx)("span",{className:"block text-xs text-gray-500 mt-1",children:"Total Spent"})]}),(0,a.jsxs)("div",{className:"bg-purple-50 rounded-lg p-3 text-center",children:[(0,a.jsx)("span",{className:"text-2xl font-bold text-purple-700",children:(null===(E=eN.companyWallet)||void 0===E?void 0:E.totalPurchased)||0}),(0,a.jsx)("span",{className:"block text-xs text-gray-500 mt-1",children:"Purchased"})]}),(0,a.jsxs)("div",{className:"bg-gray-50 rounded-lg p-3 text-center",children:[(0,a.jsx)("span",{className:"text-sm font-semibold text-gray-700",children:eN.mode}),(0,a.jsx)("span",{className:"block text-xs text-gray-500 mt-1",children:"Mode"})]})]})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"text-lg font-semibold text-gray-800 mb-3",children:"User Credit Balances"}),(null===(M=eN.userBalances)||void 0===M?void 0:M.length)>0?(0,a.jsx)("div",{className:"border rounded-lg overflow-hidden",children:(0,a.jsxs)("table",{className:"w-full text-sm",children:[(0,a.jsx)("thead",{className:"bg-gray-50 border-b",children:(0,a.jsxs)("tr",{children:[(0,a.jsx)("th",{className:"text-left px-4 py-2.5 font-medium text-gray-600",children:"User"}),(0,a.jsx)("th",{className:"text-right px-4 py-2.5 font-medium text-gray-600",children:"Allocated"}),(0,a.jsx)("th",{className:"text-right px-4 py-2.5 font-medium text-gray-600",children:"Used"}),(0,a.jsx)("th",{className:"text-right px-4 py-2.5 font-medium text-gray-600",children:"Returned"}),(0,a.jsx)("th",{className:"text-right px-4 py-2.5 font-medium text-gray-600",children:"Available"})]})}),(0,a.jsx)("tbody",{className:"divide-y",children:eN.userBalances.map((e,t)=>(0,a.jsxs)("tr",{className:"hover:bg-gray-50",children:[(0,a.jsx)("td",{className:"px-4 py-3 text-gray-700",children:e.email}),(0,a.jsx)("td",{className:"px-4 py-3 text-right text-gray-600",children:e.allocated}),(0,a.jsx)("td",{className:"px-4 py-3 text-right text-red-600",children:e.used}),(0,a.jsx)("td",{className:"px-4 py-3 text-right text-orange-600",children:e.returned}),(0,a.jsx)("td",{className:"px-4 py-3 text-right font-semibold text-blue-700",children:e.available})]},t))})]})}):(0,a.jsx)("p",{className:"text-gray-400 text-sm",children:"No user balances found"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"text-lg font-semibold text-gray-800 mb
1-3",children:"Candidate Uploads by User"}),(null===(U=eN.candidatesByUser)||void 0===U?void 0:U.length)>0?(0,a.jsx)("div",{className:"border rounded-lg overflow-hidden",children:(0,a.jsxs)("table",{className:"w-full text-sm",children:[(0,a.jsx)("thead",{className:"bg-gray-50 border-b",children:(0,a.jsxs)("tr",{children:[(0,a.jsx)("th",{className:"text-left px-4 py-2.5 font-medium text-gray-600",children:"Uploader"}),(0,a.jsx)("th",{className:"text-right px-4 py-2.5 font-medium text-gray-600",children:"Candidates"}),(0,a.jsx)("th",{className:"text-left px-4 py-2.5 font-medium text-gray-600",children:"Sources"})]})}),(0,a.jsx)("tbody",{className:"divide-y",children:eN.candidatesByUser.map((e,t)=>(0,a.jsxs)("tr",{className:"hover:bg-gray-50",children:[(0,a.jsx)("td",{className:"px-4 py-3 font-medium text-gray-700",children:e.name}),(0,a.jsx)("td",{className:"px-4 py-3 text-right font-semibold text-blue-700",children:e.count}),(0,a.jsx)("td",{className:"px-4 py-3",children:(0,a.jsx)("div",{className:"flex gap-1.5 flex-wrap",children:Object.entries(e.sourceBreakdown||{}).map(e=>{let[t,s]=e;return(0,a.jsxs)("span",{className:"px-2 py-0.5 rounded-full text-xs bg-gray-100 text-gray-600",children:[t,": ",s]},t)})})})]},t))})]})}):(0,a.jsx)("p",{className:"text-gray-400 text-sm",children:"No candidates uploaded"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"text-lg font-semibold text-gray-800 mb-3",children:"Talent Pool Overview"}),(0,a.jsxs)("div",{className:"grid grid-cols-2 md:grid-cols-5 gap-3 mb-4",children:[(0,a.jsxs)("div",{className:"bg-gray-50 rounded-lg p-3 text-center",children:[(0,a.jsx)("span",{className:"text-2xl font-bold text-gray-700",children:(null===(F=eN.poolSummary)||void 0===F?void 0:F.total)||0}),(0,a.jsx)("span",{className:"block text-xs text-gray-500 mt-1",children:"Total Profiles"})]}),(0,a.jsxs)("div",{className:"bg-yellow-50 rounded-lg p-3 text-center",children:[(0,a.jsx)("span",{className:"text-2xl font-bold text-yellow-700",children:(null===(B=eN.poolSummary)||void 0===B?void 0:B.private)||0}),(0,a.jsx)("span",{className:"block text-xs text-gray-500 mt-1",children:"Private (30-day hold)"})]}),(0,a.jsxs)("div",{className:"bg-green-50 rounded-lg p-3 text-center",children:[(0,a.jsx)("span",{className:"text-2xl font-bold text-green-700",children:(null===(W=eN.poolSummary)||void 0===W?void 0:W.inPool)||0}),(0,a.jsx)("span",{className:"block text-xs text-gray-500 mt-1",children:"In Talent Pool"})]}),(0,a.jsxs)("div",{className:"bg-blue-50 rounded-lg p-3 text-center",children:[(0,a.jsx)("span",{className:"text-2xl font-bold text-blue-700",children:(null===(V=eN.poolSummary)||void 0===V?void 0:V.firstHalfPaid)||0}),(0,a.jsx)("span",{className:"block text-xs text-gray-500 mt-1",children:"50% Credit Paid"})]}),(0,a.jsxs)("div",{className:"bg-emerald-50 rounded-lg p-3 text-center",children:[(0,a.jsx)("span",{className:"text-2xl font-bold text-emerald-700",children:(null===(H=eN.poolSummary)||void 0===H?void 0:H.fullPaid)||0}),(0,a.jsx)("span",{className:"block text-xs text-gray-500 mt-1",children:"Full Credit Paid"})]})]}),(null===(q=eN.perUserPool)||void 0===q?void 0:q.length)>0&&(0,a.jsx)("div",{className:"border rounded-lg overflow-hidden mb-4",children:(0,a.jsxs)("table",{className:"w-full text-sm",children:[(0,a.jsx)("thead",{className:"bg-gray-50 border-b",children:(0,a.jsxs)("tr",{children:[(0,a.jsx)("th",{className:"text-left px-4 py-2.5 font-medium text-gray-600",children:"Uploader"}),(0,a.jsx)("th",{className:"text-right px-4 py-2.5 font-medium text-gray-600",children:"Total"}),(0,a.jsx)("th",{className:"text-right px-4 py-2.5 font-medium text-gray-600",children:"Private"}),(0,a.jsx)("th",{className:"text-right px-4 py-2.5 font-medium text-gray-600",children:"Public"}),(0,a.jsx)("th",{className:"text-right px-4 py-2.5 font-medium text-gray-600",children:"In Pool"}),(0,a.jsx)("th",{className:"text-right px-4 py-2.5 font-medium text-gray-600",children:"Pending Release"}),(0,a.jsx)("th",{className:"text-left px-4 py-2.5 font-medium text-gray-600",children:"Next Release"})]})}),(0,a.jsx)("tbody",{className:"divide-y",children:eN.perUserPool.map((e,t)=>(0,a.jsxs)("tr",{className:"hover:bg-gray-50",children:[(0,a.jsx)("td",{className:"px-4 py-3 font-medium",children:e.uploaderName||"Unknown"}),(0,a.jsx)("td",{className:"px-4 py-3 text-right",children:e.total}),(0,a.jsx)("td",{className:"px-4 py-3 text-right text-yellow-600",children:e.private}),(0,a.jsx)("td",{className:"px-4 py-3 text-right text-green-600",children:e.public}),(0,a.jsx)("td",{className:"px-4 py-3 text-right text-blue-600",children:e.inPool}),(0,a.jsx)("td",{className:"px-4 py-3 text-right text-orange-600",children:e.pendingRelease}),(0,a.jsx)("td",{className:"px-4 py-3 text-xs text-gray-500",children:e.nextReleaseDate?S(e.nextReleaseDate):"-"})]},t))})]})}),(null===(z=eN.upcomingReleases)||void 0===z?void 0:z.length)>0&&(0,a.jsxs)("div",{children:[(0,a.jsx)("h4",{className:"text-sm font-semibold text-gray-700 mb-2",children:"Upcoming Pool Releases"}),(0,a.jsx)("div",{className:"border rounded-lg overflow-hidden",children:(0,a.jsxs)("table",{className:"w-full text-sm",children:[(0,a.jsx)("thead",{className:"bg-gray-50 border-b",children:(0,a.jsxs)("tr",{children:[(0,a.jsx)("th",{className:"text-left px-4 py-2 font-medium text-gray-600",children:"Candidate"}),(0,a.jsx)("th",{className:"text-left px-4 py-2 font-medium text-gray-600",children:"Uploaded By"}),(0,a.jsx)("th",{className:"text-left px-4 py-2 font-medium text-gray-600",children:"Source"}),(0,a.jsx)("th",{className:"text-left px-4 py-2 font-medium text-gray-600",children:"Credit Status"}),(0,a.jsx)("th",{className:"text-left px-4 py-2 font-medium text-gray-600",children:"Release Date"})]})}),(0,a.jsx)("tbody",{className:"divide-y",children:eN.upcomingReleases.map((e,t)=>(0,a.jsxs)("tr",{className:"hover:bg-gray-50",children:[(0,a.jsx)("td",{className:"px-4 py-2.5 font-medium",children:e.name}),(0,a.jsx)("td",{className:"px-4 py-2.5 text-gray-500",children:e.uploader}),(0,a.jsx)("td",{className:"px-4 py-2.5",children:(0,a.jsx)("span",{className:"px-2 py-0.5 rounded-full text-xs bg-gray-100",children:e.source})}),(0,a.jsx)("td",{className:"px-4 py-2.5",children:(0,a.jsx)("span",{className:"px-2 py-0.5 rounded-full text-xs font-medium ".concat("FULL_PAID"===e.creditStatus?"bg-green-100 text-green-700":"FIRST_HALF_PAID"===e.creditStatus?"bg-yellow-100 text-yellow-700":"bg-gray-100 text-gray-600"),children:"FIRST_HALF_PAID"===e.creditStatus?"50% Paid":"FULL_PAID"===e.creditStatus?"Full Paid":e.creditStatus||"None"})}),(0,a.jsx)("td",{className:"px-4 py-2.5 text-xs text-gray-500",children:S(e.releaseDate)})]},t))})]})})]})]}),(null===(J=eN.ledger)||void 0===J?void 0:J.length)>0&&(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"text-lg font-semibold text-gray-800 mb
1-3",children:"Transaction History"}),(0,a.jsx)("div",{className:"border rounded-lg overflow-hidden",children:(0,a.jsxs)("table",{className:"w-full text-sm",children:[(0,a.jsx)("thead",{className:"bg-gray-50 border-b",children:(0,a.jsxs)("tr",{children:[(0,a.jsx)("th",{className:"text-left px-4 py-2.5 font-medium text-gray-600",children:"Date"}),(0,a.jsx)("th",{className:"text-left px-4 py-2.5 font-medium text-gray-600",children:"Type"}),(0,a.jsx)("th",{className:"text-left px-4 py-2.5 font-medium text-gray-600",children:"Feature"}),(0,a.jsx)("th",{className:"text-left px-4 py-2.5 font-medium text-gray-600",children:"Description"}),(0,a.jsx)("th",{className:"text-left px-4 py-2.5 font-medium text-gray-600",children:"User"}),(0,a.jsx)("th",{className:"text-right px-4 py-2.5 font-medium text-gray-600",children:"Amount"}),(0,a.jsx)("th",{className:"text-right px-4 py-2.5 font-medium text-gray-600",children:"Balance"})]})}),(0,a.jsx)("tbody",{className:"divide-y",children:eN.ledger.map((e,t)=>(0,a.jsxs)("tr",{className:"hover:bg-gray-50",children:[(0,a.jsx)("td",{className:"px-4 py-2.5 text-xs text-gray-500",children:S(e.date)}),(0,a.jsx)("td",{className:"px-4 py-2.5",children:(0,a.jsx)("span",{className:"px-2 py-0.5 rounded-full text-xs font-medium ".concat("CREDIT"===e.type?"bg-green-100 text-green-700":"bg-red-100 text-red-700"),children:e.type})}),(0,a.jsx)("td",{className:"px-4 py-2.5 text-xs",children:e.featureName||e.feature}),(0,a.jsx)("td",{className:"px-4 py-2.5 text-xs text-gray-500 max-w-[200px] truncate",title:e.description,children:e.description}),(0,a.jsx)("td",{className:"px-4 py-2.5 text-xs text-gray-500",children:e.email}),(0,a.jsxs)("td",{className:"px-4 py-2.5 text-right font-medium",children:["CREDIT"===e.type?"+":"-",e.quantity]}),(0,a.jsxs)("td",{className:"px-4 py-2.5 text-right text-xs text-gray-400",children:[e.balanceBefore," â ",e.balanceAfter]})]},t))})]})})]})]}):(0,a.jsx)("p",{className:"text-gray-500",children:"No credit data available"})]}),"activity"===Z&&(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"text-lg font-semibold text-gray-800 mb-4",children:"Activity"}),(0,a.jsxs)("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4 text-sm mb-6",children:[(0,a.jsxs)("div",{className:"bg-gray-50 rounded-lg p-4 text-center",children:[(0,a.jsx)("span",{className:"text-2xl font-bold text-blue-600",children:eF.length}),(0,a.jsx)("span",{className:"block text-gray-500 mt-1",children:"Team Members"})]}),(0,a.jsxs)("div",{className:"bg-gray-50 rounded-lg p-4 text-center",children:[(0,a.jsx)("span",{className:"text-2xl font-bold text-green-600",children:Q.jobC
1ount||0}),(0,a.jsx)("span",{className:"block text-gray-500 mt-1",children:"Jobs Posted"})]}),(0,a.jsxs)("div",{className:"bg-gray-50 rounded-lg p-4 text-center",children:[(0,a.jsx)("span",{className:"text-2xl font-bold text-purple-600",children:Q.totalInterviews||0}),(0,a.jsx)("span",{className:"block text-gray-500 mt-1",children:"AI Interviews"})]}),(0,a.jsxs)("div",{className:"bg-gray-50 rounded-lg p-4 text-center",children:[(0,a.jsx)("span",{className:"text-2xl font-bold text-indigo-600",children:(null==eI?void 0:eI.total)||0}),(0,a.jsx)("span",{className:"block text-gray-500 mt-1",children:"Total Candidates"})]})]}),eI&&eI.total>0&&(0,a.jsxs)("div",{children:[(0,a.jsx)("h4",{className:"text-sm font-semibold text-gray-700 mb-3",children:"Candidate Database Breakdown"}),(0,a.jsxs)("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-3",children:[(0,a.jsxs)("div",{className:"border border-green-200 bg-green-50 rounded-lg p-4 text-center",children:[(0,a.jsx)("span",{className:"text-xl font-bold text-green-700",children:eI.sharedWithOlibr||0}),(0,a.jsx)("span",{className:"block text-xs text-green-600 mt-1",children:"In Olibr Database"})]}),(0,a.jsxs)("div",{className:"border border-amber-200 bg-amber-50 rounded-lg p-4 text-center",children:[(0,a.jsx)("span",{className:"text-xl font-bold text-amber-700",children:eI.waiting30Days||0}),(0,a.jsx)("span",{className:"block text-xs text-amber-600 mt-1",children:"30-Day Hold"}),(0,a.jsx)("span",{className:"block text-[10px] text-amber-400",children:"Waiting to enter pool"})]}),(0,a.jsxs)("div",{className:"border border-blue-200 bg-blue-50 rounded-lg p-4 text-center",children:[(0,a.jsx)("span",{className:"text-xl font-bold text-blue-700",children:eI.activeHold14Days||0}),(0,a.jsx)("span",{className:"block text-xs text-blue-600 mt-1",children:"14-Day Active Hold"}),(0,a.jsx)("span",{className:"block text-[10px] text-blue-400",children:"In active pipeline"})]}),(0,a.jsxs)("div",{className:"border border-gray-200 bg-gray-50 rounded-lg p-4 text-center",children:[(0,a.jsx)("span",{className:"text-xl font-bold text-gray-700",children:eI.private||0}),(0,a.jsx)("span",{className:"block text-xs text-gray-600 mt-1",children:"Private (Not Shared)"})]})]})]})]})]})]}),el&&(0,a.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50",onClick:()=>en(!1),children:(0,a.jsxs)("div",{className:"bg-white rounded-xl shadow-xl w-full max-w-md p-6",onClick:e=>e.stopPropagation(),children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-5",children:[(0,a.jsx)("h3",{className:"text-lg font-semibold text-gray-900",children:"Adjust Credits"}),(0,a.jsx)("button",{onClick:()=>en(!1),className:"text-gray-400 hover:text-gray-600",children:(0,a.jsx)(k.A,{className:"w-5 h-5"})})]}),null!==eh&&(0,a.jsxs)("div",{className:"bg-gray-50 rounded-lg p-3 mb-4 text-sm",children:["Current balance: ",(0,a.jsx)("span",{className:"font-semibold text-gray-900",children:eh})," credits"]}),(0,a.jsxs)("div",{className:"flex gap-2 mb-4",children:[(0,a.jsxs)("button",{onClick:()=>ed("CREDIT"),className:"flex-1 flex items-center justify-center gap-1.5 py-2.5 rounded-lg text-sm font-medium border-2 transition-colors ".concat("CREDIT"===er?"border-green-500 bg-green-50 text-green-700":"border-gray-200 text-gray-500 hover:border-gray-300"),children:[(0,a.jsx)(A.A,{className:"w-4 h-4"})," Add Credits"]}),(0,a.jsxs)("button",{onClick:()=>ed("DEBIT"),className:"flex-1 flex items-center justify-center gap-1.5 py-2.5 rounded-lg text-sm font-medium border-2 transition-colors ".concat("DEBIT"===er?"border-red-500 bg-red-50 text-red-700":"border-gray-200 text-gray-500 hover:border-gray-300"),children:[(0,a.jsx)(C.A,{className:"w-4 h-4"})," Deduct Credits"]})]}),(0,a.jsxs)("div",{className:"mb-4",children:[(0,a.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Quantity"}),(0,a.jsx)("input",{type:"number",min:"1",value:ei,onChange:e=>ec(e.target.value),placeholder:"e.g. 100",className:"w-full border border-gray-300 rounded-lg px-3 py-2.5 text-sm focus:ring-2 focus:ring-blue-500 focus:border-blue-500 outline-none"})]}),(0,a.jsxs)("div",{className:"mb-5",children:[(0,a.jsxs)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:["Reason ",(0,a.jsx)("span",{className:"text-gray-400 font-normal",children:"(optional)"})]}),(0,a.jsx)("input",{type:"text",value:ex,onChange:e=>eo(e.target.value),placeholder:"e.g. Welcome bonus, promotional credits",className:"w-full border border-gray-300 rounded-lg px-3 py-2.5 text-sm focus:ring-2 focus:ring-blue-500 focus:border-blue-500 outline-none"})]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)("button",{onClick:()=>en(!1),className:"flex-1 py-2.5 border border-gray-300 rounded-lg text-sm font-medium text-gray-600 hover:bg-gray-50",children:"Cancel"}),(0,a.jsxs)("button",{onClick:eR,disabled:em||!ei,className:"flex-1 py-2.5 rounded-lg text-sm font-medium text-white flex items-center justify-center gap-1.5 ".concat("CREDIT"===er?"bg-green-600 hover:bg-green-700":"bg-red-600 hover:bg-red-700"," disabled:opacity-50"),children:[em?(0,a.jsx)(g.A,{className:"w-4 h-4 animate-spin"}):null,"CREDIT"===er?"Add Credits":"Deduct Credits"]})]})]})})]})};var I=s(4853);let D=()=>(0,a.jsxs)(l.A,{children:[(0,a.jsx)(I.bV,{title:"Client Details",description:"View and manage client company details."}),(0,a.jsx)("div",{className:"flex-1 min-w-0 overflow-auto p-6",children:(0,a.jsx)(P,{})})]})}},e=>{var t=t=>e(e.s=t);e.O(0,[1106,399,8419,6902,607,2093,719,4642,4117,636,6593,8792],()=>t(85420)),_N_E=e.O()}]);
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.