1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6278],{77068:(e,t,s)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/dev-management/[devId]",function(){return s(98324)}])},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"}]])},16020:(e,t,s)=>{"use strict";s.d(t,{A:()=>a});let a=(0,s(86899).A)("ban",[["path",{d:"M4.929 4.929 19.07 19.071",key:"196cmz"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]])},41812:(e,t,s)=>{"use strict";s.d(t,{A:()=>a});let a=(0,s(86899).A)("bookmark-check",[["path",{d:"m19 21-7-4-7 4V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2Z",key:"169p4p"}],["path",{d:"m9 10 2 2 4-4",key:"1gnqz4"}]])},67906:(e,t,s)=>{"use strict";s.d(t,{A:()=>a});let a=(0,s(86899).A)("circle-alert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]])},41756:(e,t,s)=>{"use strict";s.d(t,{A:()=>a});let a=(0,s(86899).A)("pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]])},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"}]])},960:(e,t,s)=>{"use strict";s.d(t,{A:()=>a});let a=(0,s(86899).A)("shield-off",[["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M5 5a1 1 0 0 0-1 1v7c0 5 3.5 7.5 7.67 8.94a1 1 0 0 0 .67.01c2.35-.82 4.48-1.97 5.9-3.71",key:"1jlk70"}],["path",{d:"M9.309 3.652A12.252 12.252 0 0 0 11.24 2.28a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1v7a9.784 9.784 0 0 1-.08 1.264",key:"18rp1v"}]])},78196:(e,t,s)=>{"use strict";s.d(t,{A:()=>a});let a=(0,s(86899).A)("shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]])},50278:(e,t,s)=>{"use strict";s.d(t,{A:()=>a});let a=(0,s(86899).A)("shopping-bag",[["path",{d:"M16 10a4 4 0 0 1-8 0",key:"1ltviw"}],["path",{d:"M3.103 6.034h17.794",key:"awc11p"}],["path",{d:"M3.4 5.467a2 2 0 0 0-.4 1.2V20a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6.667a2 2 0 0 0-.4-1.2l-2-2.667A2 2 0 0 0 17 2H7a2 2 0 0 0-1.6.8z",key:"o988cm"}]])},11557:(e,t,s)=>{"use strict";s.d(t,{A:()=>a});let a=(0,s(86899).A)("star",[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]])},83004:(e,t,s)=>{"use strict";s.d(t,{A:()=>a});let a=(0,s(86899).A)("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]])},16468:(e,t,s)=>{"use strict";s.d(t,{A:()=>a});let a=(0,s(86899).A)("trending-up",[["path",{d:"M16 7h6v6",key:"box55l"}],["path",{d:"m22 7-8.5 8.5-5-5L2 17",key:"1t1m79"}]])},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"}]])},21268:(e,t,s)=>{"use strict";s.d(t,{Yq:()=>i,cn:()=>r,tN:()=>d});var a=s(34164),l=s(50856);function r(){for(var e=arguments.length,t=Array(e),s=0;s<e;s++)t[s]=arguments[s];return(0,l.QP)((0,a.$)(t))}function i(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{year:"numeric",month:"long",day:"numeric"},s="string"==typeof e?new Date(e):e;return new Intl.DateTimeFormat("en-US",t).format(s)}function d(e,t){return e?"string"!=typeof e?e:e.includes("olibr-dev-bucket")?e.replace("olibr-dev-bucket","olibr-prod-bucket"):e.includes("olibr.s3.ap-south-1.amazonaws.com")?e.replace("olibr.s3.ap-south-1.amazonaws.com","olibr-prod-bucket.s3.gra.io.cloud.ovh.net"):e:t||""}},8480:(e,t,s)=>{"use strict";s.d(t,{L:()=>x});var a=s(74848),l=s(96540),r=s(62027),i=s(69893),d=s(40773),n=s(67906),c=s(21268),o=s(23282);let x=l.forwardRef((e,t)=>
1{let{value:s={countryCode:"+91",phoneNumber:""},onChange:x,required:m,disabled:u,error:h,className:p,name:g,onBlur:v,maxLength:y=15}=e,[b,j]=(0,l.useState)(!1),[f,N]=(0,l.useState)(""),w=(0,l.useRef)(null),k=(0,l.useRef)(null);l.useImperativeHandle(t,()=>k.current);let A=o.N.find(e=>e.dial_code===s.countryCode)||o.N[0],C=o.N.filter(e=>e.name.toLowerCase().includes(f.toLowerCase())||e.dial_code.includes(f));(0,l.useEffect)(()=>{let e=e=>{w.current&&!w.current.contains(e.target)&&(j(!1),N(""))};return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[]);let S=(0,l.useCallback)(e=>{null==x||x({...s,countryCode:e}),j(!1),N("")},[x,s]),D=(0,l.useCallback)(e=>{let t=e.target.value.replace(/\D/g,"").slice(0,y);null==x||x({...s,phoneNumber:t})},[x,s,y]);return(0,a.jsxs)("div",{children:[(0,a.jsxs)("label",{className:(0,c.cn)("block text-sm font-medium mb-2",h?"text-red-700":"text-gray-700"),children:["Phone Number",m&&(0,a.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,a.jsx)("div",{className:"relative",ref:w,children:(0,a.jsxs)("div",{className:(0,c.cn)("relative flex border rounded-lg transition-all duration-200 max-h-[45px]","bg-primary-100 focus-within:bg-white",h?"border-red-300 focus-within:ring-red-500 focus-within:border-red-500":"border-gray-200 focus-within:ring-[0.5px] focus-within:ring-blue-500 focus-within:border-blue-500",u&&"opacity-50 cursor-not-allowed",p),children:[(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsxs)("button",{type:"button",onClick:()=>j(!b),className:"flex items-center space-x-2 px-3 py-3 text-gray-700 hover:bg-gray-100 transition-colors h-full border-r border-gray-200 rounded-l-lg",disabled:u,children:[(0,a.jsx)("span",{className:"text-sm font-medium",children:A.dial_code}),(0,a.jsx)(r.A,{className:"w-4 h-4 text-gray-400"})]}),b&&(0,a.jsxs)("div",{className:"absolute top-full left-0 mt-1 w-64 bg-white border border-gray-200 rounded-lg shadow-lg z-20 max-h-72 overflow-hidden",children:[(0,a.jsx)("div",{className:"p-3 border-b border-gray-200",children:(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)(i.A,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-400 w-4 h-4"}),(0,a.jsx)("input",{type:"text",placeholder:"Search countries...",value:f,onChange:e=>N(e.target.value),className:"w-full pl-9 pr-4 py-2 border border-gray-200 rounded-md focus:ring-[0.5px] focus:ring-blue-500 focus:border-blue-500 outline-none text-sm placeholder:text-sm"})]})}),(0,a.jsx)("div",{className:"max-h-48 overflow-y-auto",children:C.length>0?C.map(e=>(0,a.jsxs)("button",{type:"button",onClick:()=>S(e.dial_code),className:(0,c.cn)("w-full flex items-center space-x-3 px-4 py-3 hover:bg-gray-50 transition-colors text-left",A.dial_code===e.dial_code?"bg-blue-50 text-blue-600":""),children:[e.flag.startsWith("iVBORw0KGgo")?(0,a.jsx)("img",{src:"data:image/png;base64,".concat(e.flag),alt:e.name,className:"w-6 h-4 object-cover"}):(0,a.jsx)("span",{className:"text-lg",children:e.flag}),(0,a.jsx)("span",{className:"font-medium text-gray-700",children:e.dial_code}),(0,a.jsx)("span",{className:"text-sm text-gray-500 flex-1",children:e.name})]},e.dial_code)):(0,a.jsx)("div",{className:"px-4 py-3 text-gray-500 text-sm",children:"No countries found"})})]})]}),(0,a.jsxs)("div",{className:"relative flex-1",children:[(0,a.jsx)(d.A,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-400 w-5 h-5"}),(0,a.jsx)("input",{ref:k,type:"text",inputMode:"numeric",pattern:"\\d*",name:g,value:s.phoneNumber,onChange:D,onBlur:v,placeholder:"9876543210",maxLength:y,className:"w-full pl-10 pr-4 py-3 bg-transparent border-0 focus:outline-none text-gray-700 placeholder-gray-400 max-h-[45px] placeholder:text-sm",required:m,disabled:u,autoComplete:"tel"})]})]})}),h&&(0,a.jsxs)("p",{className:"text-red-600 text-xs mt-1 flex items-center",children:[(0,a.jsx)(n.A,{className:"w-3 h-3 mr-1"}),h]})]})});x.displayName="PhoneInput"},82035:(e,t,s)=>{"use strict";s.d(t,{A:()=>m});var a=s(74848),l=s(61714),r=s(47216),i=s(17498),d=s(95093),n=s.n(d);s(77571);var c=s(96540),o=s(74322),x=s(34479);let m=function(e){let{initialView:t="fullDate",formik:s,name:d,placeholder:m,minDate:u=!1,maxDate:h=!1,disabledPrevDate:p,disabled:g=!1,backgroundColor:v="default"}=e,y=u?n()(u):n()(),b=h?n()(h):n()(),[j,f]=(0,c.useState)(!1),N=(0,c.useRef)(null),{views:w,openTo:k,format:A}="month"===t?{views:["year","month"],openTo:"month",format:"MM/YYYY"}:"year"===t||"onlyYear"===t?{views:["year"],openTo:"year",format:"YYYY"}:{views:["year","month","day"],openTo:"day",format:"DD/MM/YYYY"},C=(0,o.A)({typography:{fontFamily:'"Jost", sans-serif'},components:{MuiPickersInputBase:{styleOverrides:{root:{fontFamily:'"Jost", sans-serif'}}},MuiPickersSectionList:{styleOverrides:{root:{fontFamily:'"Jost", sans-serif',fontSize:" 0.9rem !important",lineHeight:"1.25rem"}}}}});return(0,a.jsx)(x.A,{theme:C,children:(0,a.jsx)(l.$J,{dateAdapter:r.Y,children:(0,a.jsx)("div",{ref:N,children:(0,a.jsx)(i.l,{className:"w-full",views:w,openTo:k,format:A,value:(()=>{var e;let t=null===(e=s.values)||void 0===e?void 0:e[d];if(!t)return null;let a=n()(t,"YYYY-MM-DD");return a.isValid()?a:null})(),onChange:e=>{e?s.setFieldValue(d,e.format("YYYY-MM-DD")):s.setFieldValue(d,null)},minDate:u||p?y:void 0,maxDate:h?b:void 0,disabled:g,open:j,onOpen:()=>f(!0),onClose:()=>f(!1),closeOnSelect:"month"!==t,slotProps:{textField:{placeholder:m,fullWidth:!0,onClick:()=>f(!0),variant:"outlined",sx:{"& input":{fontFamily:'"Jost", sans-serif !important'}},InputProps:{sx:{height:"45px",backgroundColor:"white"===v?"#ffffff"
1:"#f0f5f7",borderRadius:"8px","& input":{padding:"8px 12px",fontFamily:'"Jost", sans-serif !important'},"& fieldset":{border:"none"},"&:hover fieldset":{borderColor:"#388e3c"},"&.Mui-focused fieldset":{borderColor:"#2e7d32",borderWidth:"1.5px"},"&.Mui-disabled fieldset":{borderColor:"#bdbdbd"},"&.Mui-error fieldset":{borderColor:"#d32f2f"}}}},calendarHeader:{sx:{"& .MuiPickersCalendarHeader-switchViewButton":{display:"block !important"},"& .MuiPickersCalendarHeader-label":{cursor:"pointer !important",pointerEvents:"auto !important","&:hover":{backgroundColor:"rgba(0, 0, 0, 0.04)",borderRadius:"4px"}}}},toolbar:{sx:{display:"flex","& .MuiDatePickerToolbar-title":{cursor:"pointer"}}},desktopPaper:{sx:{"& *":{fontFamily:'"Jost", sans-serif !important'},maxHeight:"300px",overflowY:"auto"}}}})})})})}},98324:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>q});var a=s(74848),l=s(84117),r=s(96540),i=s(88153),d=s(64721),n=s(21268),c=s(86715),o=s(9910),x=s(82995),m=s(82705),u=s(41812),h=s(50278),p=s(81208),g=s(90730),v=s(94828),y=s(95438),b=s(7216),j=s(78196),f=s(960),N=s(83004),w=s(16020),k=s(96010),A=s(40773),C=s(4029),S=s(11557),D=s(16468),P=s(41756),R=s(81852),F=s(76897),E=s(98097),M=s(10867),I=s(20005),T=s(46715),L=s(6402),z=s(82035),O=s(8480);let V=e=>e?new Date(e).toLocaleDateString("en-IN",{day:"2-digit",month:"short",year:"numeric"}):"N/A",_=e=>{let{status:t}=e;return(0,a.jsx)("span",{className:"px-2.5 py-1 rounded-full text-xs font-semibold capitalize ".concat({initial:"bg-gray-100 text-gray-600",pending:"bg-yellow-100 text-yellow-700",approved:"bg-green-100 text-green-700",rejected:"bg-red-100 text-red-700"}[t]||"bg-gray-100 text-gray-600"),children:t||"N/A"})},H=[{id:"profile",label:"Profile",icon:o.A},{id:"assessments",label:"My Assessments",icon:x.A},{id:"job-assessments",label:"Job Assessments",icon:m.A},{id:"saved-jobs",label:"Saved Jobs",icon:u.A},{id:"services",label:"Services",icon:h.A},{id:"reviews",label:"My Reviews",icon:p.A},{id:"video",label:"Video Introduction",icon:g.A},{id:"settings",label:"Settings",icon:v.A}],B=e=>{let{email:t}=e,[s,l]=(0,r.useState)([]),[d,n]=(0,r.useState)(!0);return((0,r.useEffect)(()=>{t&&(async()=>{var e,s,a,r;try{let a=await i.default.get("/client/internal/candidate-assessments",{params:{email:t}});(null===(e=a.data)||void 0===e?void 0:e.success)&&l((null===(s=a.data.data)||void 0===s?void 0:s.assessments)||[])}catch(e){try{let e=await i.default.get("/candidate/my-assessments",{params:{email:t}});(null===(a=e.data)||void 0===a?void 0:a.success)&&l((null===(r=e.data.data)||void 0===r?void 0:r.assessments)||[])}catch(e){}}n(!1)})()},[t]),d)?(0,a.jsx)("div",{className:"flex justify-center py-8",children:(0,a.jsx)(y.A,{className:"w-5 h-5 animate-spin text-blue-600"})}):(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"text-lg font-semibold text-gray-800 mb-4",children:"Job Assessments"}),0===s.length?(0,a.jsx)("p",{className:"text-gray-500",children:"No job assessments sent to this candidate"}):(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:"Test Name"}),(0,a.jsx)("th",{className:"text-left px-4 py-2.5 font-medium text-gray-600",children:"Duration"}),(0,a.jsx)("th",{className:"text-left px-4 py-2.5 font-medium text-gray-600",children:"Sent By"}),(0,a.jsx)("th",{className:"text-left px-4 py-2.5 font-medium text-gray-600",children:"Expires"}),(0,a.jsx)("th",{className:"text-left px-4 py-2.5 font-medium text-gray-600",children:"Platform"}),(0,a.jsx)("th",{className:"text-left px-4 py-2.5 font-medium text-gray-600",children:"Sent On"})]})}),(0,a.jsx)("tbody",{className:"divide-y",children:s.map((e,t)=>(0,a.jsxs)(r.Fragment,{children:[(e.assessmentDetails||[]).map((s,l)=>{var r;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)(x.A,{className:"w-4 h-4 text-gray-400"}),(0,a.jsx)("span",{className:"font-medium text-gray-800",children:s.name||(null===(r=e.assessmentNames)||void 0===r?void 0:r[l])||"Assessment"})]})}),(0,a.jsx)("td",{className:"px-4 py-3 text-gray-600",children:s.duration?"".concat(s.duration," Min"):"-"}),(0,a.jsx)("td",{className:"px-4 py-3 text-gray-600 text-xs",children:e.sentByName||"-"}),(0,a.jsx)("td",{className:"px-4 py-3 text-xs",children:e.linkExpireDate?V(e.linkExpireDate):"-"}),(0,a.jsx)("td",{className:"px-4 py-3",children:(0,a.jsx)("div",{className:"w-7 h-7 rounded-lg flex items-center justify-center text-white text-xs font-bold ".concat(s.isHackerearth?"bg-blue-600":"bg-black"),children:s.isHackerearth?"HE":"HR"})}),(0,a.jsx)("td",{className:"px-4 py-3 text-xs text-gray-500",children:V(e.createdAt)})]},"".concat(t,"-").concat(l))}),(!e.assessmentDetails||0===e.assessmentDetails.length)&&(e.assessmentNames||[]).map((s,l)=>(0,a.jsxs)("tr",{className:"hover:bg-gray-50",children:[(0,a.jsx)("td",{className:"px-4 py-3 font-medium",children:s}),(0,a.jsx)("td",{className:"px-4 py-3 text-gray-600",children:"-"}),(0,a.jsx)("td",{className:"px-4 py-3 text-gray-600 text-xs",children:e.sentByName||"-"}),(0,a.jsx)("td",{className:"px-4 py-3 text-xs",children:e.linkExpireDate?V(e.linkExpireDate):"-"}),(0,a.jsx)("td",{className:"px-4 py-3",children:(0,a.jsx)("div",{className:"w-7 h-7 rounded-lg bg-black text-white text-xs font-bold flex items-center justify-center",children:"HR"})}),(0,a.jsx)("td",{className:"px-4 py-3 text-xs text-gray-500",children:V(e.createdAt)})]},"".concat(t,"-n-").concat(l)))]},e._id||t))})]})})]})},Y=e=>{let{userId:t}=e,[s,l]=(0,r.useState)([]),[d,n]=(0,r.useState)(!0);return((0,r.useEffect)(()=>{t&&(async()=>{try{var e;let s=await i.default.get("/admin-candidate/admin-candidates/".concat(t,"/saved-jobs"));(null===(e=s.data)||void 0===e?void 0:e.success)&&l(s.data.data||[])}catch(e){}n(!1)})()},[t]),d)?(0,a.jsx)("div",{className:"flex justify-center py-8",children:(0,a.jsx)(y.A,{className:"w-5 h-5 animate-spin text-blue-600"})}):(0,a.jsxs)("div",{children:[(0,a.jsxs)("h3",{className:"text-lg font-semibold text-gray-800 mb
1-4",children:["Saved Jobs (",s.length,")"]}),0===s.length?(0,a.jsx)("p",{className:"text-gray-500",children:"No saved jobs"}):(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:"Company"}),(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:"Saved On"})]})}),(0,a.jsx)("tbody",{className:"divide-y",children:s.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-800",children:e.jobTitle||e.title||"Untitled"}),(0,a.jsx)("td",{className:"px-4 py-3 text-gray-600",children:e.companyName||e.company||"-"}),(0,a.jsx)("td",{className:"px-4 py-3 text-gray-600 text-xs",children:Array.isArray(e.jobLocation)?e.jobLocation.join(", "):e.jobLocation||"-"}),(0,a.jsx)("td",{className:"px-4 py-3 text-xs text-gray-500",children:e.savedAt||e.createdAt?V(e.savedAt||e.createdAt):"-"})]},e._id||t))})]})})]})},J=e=>{let{candidate:t,devId:s,onSave:l,onNext:n,saveRef:c}=e,o=e=>{let t=parseFloat(e)||0,s=Math.floor(t),a=Math.round((t-s)*100);return{lacs:s.toString(),thousands:a.toString()}},x="INR"===t.currency?o(t.devCSalar):{lacs:"",thousands:""},m="INR"===t.currency?o(t.devExpSalary):{lacs:"",thousands:""},[u,h]=(0,r.useState)({devDesignation:t.devDesignation||"",fName:t.fName||"",lName:t.lName||"",devMobile:t.devMobile||"",devCountryCode:t.devCountryCode||"+91",devIndustry:t.devIndustry||"",devAddress:t.devAddress||"",devAddress2:t.devAddress2||"",devState:t.devState||"",devCity:t.devCity||"",devPin:t.devPin||"",locationPreference:(t.locationPreference||[])[0]||"",currency:t.currency||"$",devCSalar:"INR"!==t.currency?String(t.devCSalar||""):"",devExpSalary:"INR"!==t.currency?String(t.devExpSalary||""):"",currentLacs:x.lacs,currentThousands:x.thousands,expectedLacs:m.lacs,expectedThousands:m.thousands,salaryDuration:t.salaryDuration||"Hourly",devNoticePeriod:String(t.devNoticePeriod||""),devAvlFrom:t.devAvlFrom?new Date(t.devAvlFrom).toISOString().split("T")[0]:""}),[p,g]=(0,r.useState)(!1),[v,y]=(0,r.useState)({}),b=(e,t)=>{h(s=>({...s,[e]:t})),v[e]&&y(t=>({...t,[e]:!1}))},j={devDesignation:"Designation",fName:"First Name",lName:"Last Name",devMobile:"Mobile Number",devIndustry:"Industry",devAddress:"Address 1",devState:"State",devCity:"City",devPin:"Pin Code",locationPreference:"Job Preferences",currency:"Currency",devCSalar:"Current Salary",devExpSalary:"Expected Salary",salaryDuration:"Salary Duration",devNoticePeriod:"Notice Period"},f=()=>{let e={},t=[];for(let[s,a]of Object.entries(j)){if("INR"===u.currency&&"devCSalar"===s){u.currentLacs||"0"===u.currentLacs||(e[s]=!0,t.push(a));continue}if("INR"===u.currency&&"devExpSalary"===s){u.expectedLacs||"0"===u.expectedLacs||(e[s]=!0,t.push(a));continue}u[s]||(e[s]=!0,t.push(a))}return y(e),!(t.length>0)||(d.toast.error("Please fill: ".concat(t.slice(0,3).join(", ")).concat(t.length>3?" and ".concat(t.length-3," more"):"")),!1)},N=async()=>{if(f())try{g(!0);let e=u.devCSalar,t=u.devExpSalary;"INR"===u.currency&&(e=String(parseFloat(u.currentLacs||"0")+parseFloat(u.currentThousands||"0")/100),t=String(parseFloat(u.expectedLacs||"0")+parseFloat(u.expectedThousands||"0")/100));let{currentLacs:a,currentThousands:r,expectedLacs:c,expectedThousands:o,...x}=u;await i.default.put("/admin-candidate/admin-candidates/".concat(s,"/profile"),{...x,devCSalar:e,devExpSalary:t,locationPreference:u.locationPreference?[u.locationPreference]:[]}),d.toast.success("Profile saved successfully"),l(),n()}catch(s){var e,t;d.toast.error((null===(t=s.response)||void 0===t?void 0:null===(e=t.data)||void 0===e?void 0:e.message)||"Failed to save")}finally{g(!1)}},w=e=>"w-full border rounded-lg px-3 py-2.5 text-sm bg-gray-50 text-gray-700 outline-none focus:ring-2 focus:ring-blue-500 focus:bg-white ".concat(v[e]?"border-red-400 bg-red-50":""),k=(e,t,s)=>(0,a.jsxs)("label",{className:"block text-sm font-medium mb-1 ".concat(v[t||""]?"text-red-500":"text-gray-700"),children:[e,s&&(0,a.jsx)("span",{className:"text-red-500",children:"*"})]});return(0,a.jsxs)("div",{className:"space-y-5",children:[(0,a.jsxs)("div",{className:"grid grid-cols-3 gap-4",children:[(0,a.jsxs)("div",{children:[k("Designation","devDesignation",!0),(0,a.jsx)("input",{type:"text",value:u.devDesignation,onChange:e=>b("devDesignation",e.target.value),className:w("devDesignation")})]}),(0,a.jsxs)("div",{children:[k("First Name","fName",!0),(0,a.jsx)("input",{type:"text",value:u.fN
1ame,onChange:e=>b("fName",e.target.value),className:w("fName")})]}),(0,a.jsxs)("div",{children:[k("Last Name","lName",!0),(0,a.jsx)("input",{type:"text",value:u.lName,onChange:e=>b("lName",e.target.value),className:w("lName")})]})]}),(0,a.jsxs)("div",{className:"grid grid-cols-3 gap-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block text-sm font-semibold text-gray-700 mb-1",children:"Email"}),(0,a.jsx)("input",{type:"text",value:t.email||"",readOnly:!0,className:"w-full border rounded-lg px-3 py-2.5 text-sm bg-gray-100 text-gray-500 cursor-not-allowed"})]}),(0,a.jsxs)("div",{children:[k("Mobile Number","devMobile",!0),(0,a.jsx)(O.L,{value:{countryCode:u.devCountryCode||"+91",phoneNumber:u.devMobile||""},onChange:e=>{b("devCountryCode",e.countryCode),b("devMobile",e.phoneNumber.replace(/\D/g,""))},error:v.devMobile?"Mobile number is required":void 0})]}),(0,a.jsxs)("div",{children:[k("Industry","devIndustry",!0),(0,a.jsx)(L.A,{value:u.devIndustry,onChange:e=>b("devIndustry",e),optionArray:[{value:"",label:"Select Industry"},{value:"IT",label:"IT"},{value:"Healthcare",label:"Healthcare"},{value:"Finance",label:"Finance"},{value:"Education",label:"Education"},{value:"E-commerce",label:"E-commerce"},{value:"Other",label:"Other"}]})]})]}),(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,a.jsxs)("div",{children:[k("Address 1","devAddress",!0),(0,a.jsx)("input",{type:"text",value:u.devAddress,onChange:e=>b("devAddress",e.target.value),placeholder:"Address 1",className:w("devAddress")})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block text-sm font-semibold text-gray-700 mb-1",children:"Address 2"}),(0,a.jsx)("input",{type:"text",value:u.devAddress2,onChange:e=>b("devAddress2",e.target.value),placeholder:"Address 2",className:w("")})]})]}),(0,a.jsxs)("div",{className:"grid grid-cols-4 gap-4",children:[(0,a.jsxs)("div",{children:[k("State","devState",!0),(0,a.jsx)("input",{type:"text",value:u.devState,onChange:e=>b("devState",e.target.value),className:w("devState")})]}),(0,a.jsxs)("div",{children:[k("City","devCity",!0),(0,a.jsx)("input",{type:"text",value:u.devCity,onChange:e=>b("devCity",e.target.value),className:w("devCity")})]}),(0,a.jsxs)("div",{children:[k("Pin Code","devPin",!0),(0,a.jsx)("input",{type:"text",value:u.devPin,onChange:e=>b("devPin",e.target.value),className:w("devPin")})]}),(0,a.jsxs)("div",{children:[k("Job Preferences","locationPreference",!0),(0,a.jsx)(L.A,{value:u.locationPreference,onChange:e=>b("locationPreference",e),optionArray:[{value:"",label:"Select"},{value:"onsite",label:"Onsite"},{value:"remote",label:"Remote"},{value:"hybrid",label:"Hybrid"}]})]})]}),(0,a.jsxs)("div",{className:"grid gap-4 ".concat("INR"===u.currency?"grid-cols-2":"grid-cols-4"),children:[(0,a.jsxs)("div",{children:[k("Currency","currency",!0),(0,a.jsx)(L.A,{value:u.currency,onChange:e=>{b("currency",e),"INR"===e?(b("devCSalar",""),b("devExpSalary","")):(b("currentLacs",""),b("currentThousands",""),b("expectedLacs",""),b("expectedThousands",""))},optionArray:[{value:"$",label:"$"},{value:"INR",label:"INR"}]})]}),(0,a.jsxs)("div",{children:[k("Salary Duration","salaryDuration",!0),(0,a.jsx)(L.A,{value:u.salaryDuration,onChange:e=>b("salaryDuration",e),optionArray:[{value:"Hourly",label:"Hourly"},{value:"Monthly",label:"Monthly"},{value:"Annually",label:"Annually"},{value:"Project Based",label:"Project Based"}]})]})]}),"INR"===u.currency?(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,a.jsxs)("div",{children:[k("Current Salary (INR)","devCSalar",!0),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsx)("label",{className:"block text-xs text-gray-400 mb-0.5",children:"Lacs"}),(0,a.jsx)(L.A,{value:u.currentLacs,onChange:e=>b("currentLacs",e),optionArray:[{value:"",label:"Select"},...Array.from({length:101},(e,t)=>({value:t.toString(),label:t.toString()}))]})]}),(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsx)("label",{className:"block text-xs text-gray-400 mb-0.5",children:"Thousands"}),(0,a.jsx)(L.A,{value:u.currentThousands,onChange:e=>b("currentThousands",e),optionArray:[0,10,20,30,40,50,60,70,80,90].map(e=>({value:e.toString(),label:e.toString()}))})]})]})]}),(0,a.jsxs)("div",{children:[k("Expected Salary (INR)","devExpSalary",!0),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsx)("label",{className:"block text-xs text-gray-400 mb-0.5",children:"Lacs"}),(0,a.jsx)(L.A,{value:u.expectedLacs,onChange:e=>b("expectedLacs",e),optionArray:[{value:"",label:"Select"},...Array.from({length:101},(e,t)=>({value:t.toString(),label:t.toString()}))]})]}),(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsx)("label",{className:"block text-xs text-gray-400 mb-0.5",children:"Thousands"}),(0,a.jsx)(L.A,{value:u.expectedThousands,onChange:e=>b("expectedThousands",e),optionArray:[0,10,20,30,40,50,60,70,80,90].map(e=>({value:e.toString(),label:e.toString()}))})]})]})]})]}):(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,a.jsxs)("div",{children:[k("Current Salary ($)","devCSalar",!0),(0,a.jsx)("input",{type:"number",value:u.devCSalar,onChange:e=>b("devCSalar",e.target.value),placeholder:"Enter current salary",className:w("devCSalar")})]}),(0,a.jsxs)("div",{children:[k("Expected Salary ($)","devExpSalary",!0),(0,a.jsx)("input",{type:"number",value:u.devExpSalary,onChange:e=>b("devExpSalary",e.target.value),placeholder:"Enter expected salary",className:w("devExpSalary")})]})]}),(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,a.jsxs)("div",{children:[k("Notice period (Days)","devNoticePeriod",!0),(0,a.jsx)(L.A,{value:u.devNoticePeriod,onChange:e=>b("devNoticePeriod",e),optionArray:[{value:"",label:"Select"},{value:"0",label:"Immediate"},{value:"15",label:"15 Days"},{value:"30",label:"30 Days"},{value:"45",label:"45 Days"},{value:"60",label:"60 Days"},{value:"90",label:"90 Days"}]})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block text-sm font-semibold text-gray-700 mb-1",children:"Available From"}),(0,a.jsx)(z.A,{initialView:"fullDate",formik:{values:u,setFieldValue:(e,t)=>
1{b(e,t)}},name:"devAvlFrom",placeholder:"Select date"})]})]}),c&&(c.current=N,null)]})},W=()=>{var e,t,s,l,u,h,p,g,v,L,O,W,U,q,G,$,K,X,Q,Z,ee,et,es,ea,el,er;let ei=(0,c.useRouter)(),{devId:ed}=ei.query,[en,ec]=(0,r.useState)(null),[eo,ex]=(0,r.useState)(!0),[em,eu]=(0,r.useState)("profile"),[eh,ep]=(0,r.useState)(!1),[eg,ev]=(0,r.useState)(""),[ey,eb]=(0,r.useState)(!1),[ej,ef]=(0,r.useState)(1),[eN,ew]=(0,r.useState)(!1),ek=(0,r.useRef)(null),[eA,eC]=(0,r.useState)(!1),[eS,eD]=(0,r.useState)(""),[eP,eR]=(0,r.useState)({}),[eF,eE]=(0,r.useState)(!1),eM=e=>e?e instanceof Date?e.toISOString().slice(0,10):"string"==typeof e?e:"object"==typeof e&&(null==e?void 0:e.toDate)instanceof Function?e.toDate().toISOString().slice(0,10):"":"",eI={values:eP,setFieldValue:(e,t)=>{eR(s=>({...s,[e]:eM(t)}))}},eT=async()=>{var e,t,s,a;try{eE(!0);let s="",a={};"employment"===eS?(s="/admin-candidate/admin-candidates/".concat(ed,"/employment"),a={designation:eP.designation,companyName:eP.companyName,startDate:eP.startDate,endDate:eP.endDate,isCurrent:eP.isCurrent,technologies:(null===(e=eP.technologies)||void 0===e?void 0:e.split(",").map(e=>e.trim()).filter(Boolean))||[],description:eP.description}):"education"===eS?(s="/admin-candidate/admin-candidates/".concat(ed,"/education"),a={collegeName:eP.collegeName,degree:eP.degree,stream:eP.stream,startDate:eP.startDate,endDate:eP.endDate}):"project"===eS?(s="/admin-candidate/admin-candidates/".concat(ed,"/project"),a={title:eP.title,clientName:eP.clientName,role:eP.role,industry:eP.industry,projectLink:eP.projectLink,description:eP.description,responsibilities:eP.responsibilities,technologies:(null===(t=eP.skills)||void 0===t?void 0:t.split(",").map(e=>e.trim()).filter(Boolean))||[]}):"certification"===eS?(s="/admin-candidate/admin-candidates/".concat(ed,"/certification"),a={name:eP.name,organization:eP.organization,startDate:eP.startDate,endDate:eP.endDate}):"achievement"===eS&&(s="/admin-candidate/admin-candidates/".concat(ed,"/achievement"),a={title:eP.title,organization:eP.organization,description:eP.description}),await i.default.post(s,a),d.toast.success("Added successfully"),eC(!1),eR({}),eL()}catch(e){d.toast.error((null===(a=e.response)||void 0===a?void 0:null===(s=a.data)||void 0===s?void 0:s.message)||"Failed to save")}finally{eE(!1)}},eL=(0,r.useCallback)(async()=>{if(ed)try{var e;ex(!0);let t=await i.default.get("/admin-candidate/admin-candidates/".concat(ed));(null===(e=t.data)||void 0===e?void 0:e.success)?ec(t.data.data):d.toast.error("Candidate not found")}catch(e){d.toast.error("Failed to load candidate")}finally{ex(!1)}},[ed]);(0,r.useEffect)(()=>{eL()},[eL]);let ez=async(e,t)=>{try{ep(!0);let s={status:e};t&&(s.feedback=t),await i.default.put("/admin-candidate/admin-candidates/".concat(ed,"/status"),s),d.toast.success("Candidate ".concat(e)),eb(!1),ev(""),eL()}catch(e){var s,a;d.toast.error((null===(a=e.response)||void 0===a?void 0:null===(s=a.data)||void 0===s?void 0:s.message)||"Failed")}finally{ep(!1)}},eO=async e=>{try{await i.default.put("/admin-candidate/admin-candidates/".concat(ed,"/spotlight"),{enable:e,expiryDate:e?new Date(Date.now()+2592e6).toISOString():null}),d.toast.success(e?"Spotlight enabled (30 days)":"Spotlight removed"),eL()}catch(e){d.toast.error("Failed")}},eV=async e=>{try{await i.default.put("/admin-candidate/admin-candidates/".concat(ed,"/promote"),{enable:e,expiryDate:e?new Date(Date.now()+2592e6).toISOString():null}),d.toast.success(e?"Promoted (30 days)":"Promotion removed"),eL()}catch(e){d.toast.error("Failed")}},e_=async()=>{try{await i.default.put("/admin-candidate/admin-candidates/".concat(ed,"/block")),d.toast.success((null==en?void 0:en.isBlocked)?"Unblocked":"Blocked"),eL()}catch(e){d.toast.error("Failed")}},eH=async()=>{if(confirm("Permanently delete this candidate?"))try{await i.default.delete("/admin-candidate/admin-candidates/".concat(ed)),d.toast.success("Deleted"),ei.push("/admin/dev-management")}catch(e){d.toast.error("Failed")}},eB=(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)("h1",{className:"text-xl sm:text-3xl font-medium text-gray-900",children:"Developer Management"}),(0,a.jsxs)("button",{onClick:()=>ei.push("/admin/dev-management"),className:"flex items-center gap-1 text-blue-600 hover:text-blue-800 text-sm font-medium",children:[(0,a.jsx)(b.A,{className:"w-4 h-4"})," BACK"]})]});if(eo)return(0,a.jsxs)("div",{className:"space-y-6 min-w-0",children:[eB,(0,a.jsx)("div",{className:"flex items-center justify-center py-20",children:(0,a.jsx)(y.A,{className:"w-6 h-6 animate-spin text-blue-600"})})]});if(!en)return(0,a.jsxs)("div",{className:"space-y-6 min-w-0",children:[eB,(0,a.jsx)("div",{className:"text-center py-20",children:(0,a.jsx)("p",{className:"text-gray-500",children:"Candidate not found"})})]});let eY="".concat(en.fName||""," ").concat(en.lName||"").trim()||"Unknown";return(0,a.jsxs)("div",{className:"space-y-6 min-w-0",children:[(0,a.jsx)("h1",{className:"text-xl sm:text-3xl font-medium text-gray-900",children:"Developer Management"}),(0,a.jsxs)("div",{className:"flex items-center justify-between flex-wrap gap-3",children:[(0,a.jsxs)("button",{onClick:()=>ei.push("/admin/dev-management"),className:"flex items-center gap-1 text-blue-600 hover:text-blue-800 text-sm font-medium",children:[(0,a.jsx)(b.A,{className:"w-4 h-4"})," BACK"]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("button",{onClick:e_,className:"flex items-center gap-1.5 px-3 py-2 rounded-lg text-sm font-medium border transition-colors ".concat(en.isBlocked?"bg-emerald-50 border-emerald-300 text-emerald-700 hover:bg-emerald-100":"bg-white border-gray-300 text-gray-700 hover:bg-red-50 hover:border-red-300 hover:text-red-700"),children:en.isBlocked?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(j.A,{className:"w-4 h-4"})," Unblock"]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(f.A,{className:"w-4 h-4"})," Block"]})}),(0,a.jsx)("button",{onClick:eH,className:"p-2 text-red-500 hover:bg-red-50 rounded-lg",title:"Delete",children:(0,a.jsx)(N.A,{className:"w-4 h-4"})}),(0,a.jsxs)("button",{onClick:async()=>{try{var e,t;let s=await i.default.post("/admin-candidate/admin-candidates/".concat(ed,"/proxy-login")),a=null===(t=s.data)||void 0===t?void 0:null===(e=t.data)||void 0===e?void 0:e.token;if(a){let e="".concat(window.location.origin,"/proxy-login?token=").concat(a);await navigator.clipboard.writeText(e).catch(()=>{}),window.open(e,"_blank"),d.toast.success("Proxy URL also copied to clipboard. For best results, paste in an Incognito window.",{duration:5e3})}else d.toast.error("Failed to get proxy token")}catch(e){d.toast.error("Failed to generate proxy login")}},className:"flex items-center gap-1.5 bg-purple-600 text-white px-3 py-2 rounded-lg text-sm font-medium hover:bg-purple-700",title:"Login as this developer",children:[(0,a.jsx)(o.A,{className:"w-4 h-4"})," Proxy Login"]})]})]}),(0,a.jsxs)("div",{className:"bg-white rounded-xl border p-6 relative",children:[(0,a.jsxs)("div",{className:"flex items-start gap-4",children:[(0,a.jsxs)("div",{className:"w-16 h-16 relative",children:[en.isBlocked&&(0,a.jsx)(w.A,{className:"absolute text-red-400",width:"100%",height:"100%"}),en.devPhoto?(0,a.jsx)("img",{src:en.devPhoto,className:"w-16 h-16 rounded-full object-cover",alt:""}):(0,a.jsx)("div",{className:"w-16 h-16 rounded-full bg-blue-100 flex items-center justify-center text-xl font-bold text-blue-600",children:((null===(e=en.fName)||void 0===e?void 0:e[0])||"?").toUpperCase()})]}),(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsx)("h2",{className:"text-xl font-bold text-gray-800",children:eY}),en.devDesignation&&(0,a.jsx)("p",{className:"text-gray-600",children:en.devDesignation}),(0,a.jsxs)("div",{className:"flex items-center gap-4 mt-2 text-sm text-gray-500 flex-wrap",children:[(0,a.jsxs)("span",{className:"flex items-center gap-1",children:[(0,a.jsx)(k.A,{className:"w-3.5 h-3.5"})," ",en.email]}),en.devMobile&&(0,a.jsxs)("span",{className:"flex items-center gap-1",children:[(0,a.jsx)(A.A,{className:"w-3.5 h-3.5"})," ",en.devCountryCode,en.devMobile]}),en.location&&(0,a.jsxs)("span",{className:"flex items-center gap-1",children:[(0,a.jsx)(C.A,{className:"w-3.5 h-3.5"})," ",en.location]})]})]}),en.isBlocked?(0,a.jsxs)("div",{className:"flex items-start gap-3 rounded-xl border border-red-200 bg-red-50 p-4",children:[(0,a.jsx)("div",{className:"mt-0.5",children:(0,a.jsx)(f.A,{className:"h-5 w-5 text-red-600"})}),(0,a.jsxs)("div",{className:"flex flex-col",children:[(0,a.jsx)("span",{className:"text-sm font-semibold text-red-700",children:"Candidate Blocked"}),(0,a.jsx)("span",{className:"text-sm text-red-600",children:"You have blocked this candidate. They cannot access the platform."})]})]}):(0,a.jsxs)("div",{className:"flex flex-col gap-2 items-end",children:[(0,a.jsx)(_,{status:en.devStatus}),(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(S.A,{className:"w-3.5 h-3.5 ".concat(en.spotLight?"fill-yellow-400 text-yellow-500":"text-gray-400")}),(0,a.jsx)("span",{className:"text-xs font-medium text-gray-600",children:"Spotlight"}),(0,a.jsx)("button",{type:"button",role:"switch","aria-checked":!!en.spotLight,onClick:()=>eO(!en.spotLight),className:"relative inline-flex h-5 w-9 items-center rounded-full transition-colors ".concat(en.spotLight?"bg-yellow-500":"bg-gray-300"),children:(0,a.jsx)("span",{className:"inline-block h-4 w-4 transform rounded-full bg-white shadow transition-transform ".concat(en.spotLight?"translate-x-[1.15rem]":"translate-x-0.5")})})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(D.A,{className:"w-3.5 h-3.5 ".concat(en.isPromotedProfile?"text-blue-600":"text-gray-400")}),(0,a.jsx)("span",{className:"text-xs font-medium text-gray-600",children:"Promote"}),(0,a.jsx)("button",{type:"button",role:"switch","aria-checked":!!en.isPromotedProfile,onClick:()=>eV(!en.isPromotedProfile),className:"relative inline-flex h-5 w-9 items-center rounded-full transition-colors ".concat(en.isPromotedProfile?"bg-blue-600":"bg-gray-300"),children:(0,a.jsx)("span",{className:"inline-block h-4 w-4 transform rounded-full bg-white shadow transition-transform ".concat(en.isPromotedProfile?"translate-x-[1.15rem]":"translate-x-0.5")})})]})]})]})]}),(0,a.jsxs)("div",{className:"grid grid-cols-4 gap-4 mt-4 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:V(en.createdAt)})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"text-gray-400 block",children:"Approved On"}),(0,a.jsx)("span",{className:"font-medium",children:V(en.directApprovedOn||en.devApprovedOn)})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"text-gray-400 block",children:"Last Login"}),(0,a.jsx)("span",{className:"font-medium",children:V(en.lastLogin||en.updatedAt)})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"text-gray-400 block",children:"Assessment Credits"}),(0,a.jsx)("span",{className:"font-medium",children:en.devAssessmentCredits||0})]})]})]}),(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:H.map(e=>(0,a.jsxs)("button",{onClick:()=>eu(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(em===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:["profile"===em&&(0,a.jsxs)("div",{className:"space-y-6",children:[!eN&&(0,a.jsxs)("div",{className:"space-y-6",children:[(0,a.jsx)("div",{className:"flex justify-end",children:(0,a.jsxs)("button",{onClick:async()=>{try{var e,t;let s=await i.default.post("/admin-candidate/admin-candidates/".concat(ed,"/proxy-login")),a=null===(t=s.data)||void 0===t?void 0:null===(e=t.data)||void 0===e?void 0:e.token;if(a){let e="".concat(window.location.origin,"/proxy-login?token=").concat(a);await navigator.clipboard.writeText(e),d.toast.success("Proxy URL copied! Open in an Incognito/Private window to edit as candidate.",{duration:5e3}),window.open(e,"_blank")}}catch(e){d.toast.error("Failed to open candidate profile")}},className:"flex items-center gap-1.5 bg-blue-600 text-white px-4 py-2 rounded-lg text-sm font-medium hover:bg-blue-700",children:[(0,a.jsx)(P.A,{className:"w-4 h-4"})," Edit Profile"]})}),(0,a.jsxs)("div",{className:"flex items-start gap-5",children:[en.devPhoto?(0,a.jsx)("img",{src:(0,n.tN)(en.devPhoto),className:"w-20 h-20 rounded-full object-cover border-2 border-gray-200",alt:""}):(0,a.jsx)("div",{className:"w-20 h-20 rounded-full bg-blue-100 flex items-center justify-center text-2xl font-bold text-blue-600 border-2 border-blue-200",children:((null===(t=en.fName)||void 0===t?void 0:t[0])||"?").toUpperCase()}),(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsx)("h2",{className:"text-2xl font-bold text-gray-900",children:eY}),en.devDesignation&&(0,a.jsx)("p",{className:"text-gray-600 mt-0.5",children:en.devDesignation}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-4 mt-2 text-sm text-gray-500",children:[en.location&&(0,a.jsxs)("span",{className:"flex items-center gap-1",children:[(0,a.jsx)(C.A,{className:"w-3.5 h-3.5"})," ",en.location]}),en.devTotalExperience>0&&(0,a.jsxs)("span",{className:"flex items-center gap-1",children:[(0,a.jsx)(m.A,{className:"w-3.5 h-3.5"})," ",en.devTotalExperience," years"]}),(0,a.jsxs)("span",{className:"flex items-center gap-1",children:[(0,a.jsx)(k.A,{className:"w-3.5 h-3.5"})," ",en.email]}),en.devMobile&&(0,a.jsxs)("span",{className:"flex items-center gap-1",children:[(0,a.jsx)(A.A,{className:"w-3.5 h-3.5"})," ",en.devCountryCode||"+91"," ",en.devMobile]})]})]})]}),(en.about||en.devTellUrStory||en.devAbout)&&(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"text-lg font-semibold text-gray-800 mb
1-2",children:"About"}),(0,a.jsx)("p",{className:"text-gray-600 text-sm leading-relaxed whitespace-pre-line",children:en.about||en.devTellUrStory||en.devAbout})]}),((null===(s=en.devSkillsInfo)||void 0===s?void 0:s.length)>0||(null===(l=en.emergingSkills)||void 0===l?void 0:l.length)>0||(null===(u=en.devChooseSkills)||void 0===u?void 0:u.length)>0)&&(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"text-lg font-semibold text-gray-800 mb-3",children:"Skills"}),(0,a.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(en.devSkillsInfo||[]).map((e,t)=>(0,a.jsx)("span",{className:"px-3 py-1.5 bg-blue-50 text-blue-700 rounded-full text-sm font-medium border border-blue-200",children:e.skillName||e},t)),(null===(h=en.devSkillsInfo)||void 0===h?void 0:h.length)===0&&(en.emergingSkills||en.devChooseSkills||[]).map((e,t)=>(0,a.jsx)("span",{className:"px-3 py-1.5 bg-blue-50 text-blue-700 rounded-full text-sm font-medium border border-blue-200",children:e},t))]})]}),(null===(p=en.devEmployment)||void 0===p?void 0:p.length)>0&&(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"text-lg font-semibold text-gray-800 mb-3",children:"Work Experience"}),(0,a.jsx)("div",{className:"space-y-4",children:en.devEmployment.map((e,t)=>(0,a.jsxs)("div",{className:"border-l-2 border-blue-300 pl-4",children:[(0,a.jsxs)("div",{className:"flex justify-between items-start",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h4",{className:"font-semibold text-gray-800",children:e.designation||e.title||"Position"}),(0,a.jsx)("p",{className:"text-blue-600 text-sm",children:e.companyName||e.company})]}),(0,a.jsxs)("span",{className:"text-xs text-gray-400 whitespace-nowrap",children:[e.from||e.startDate||""," - ",e.stillWorking?"Present":e.to||e.endDate||""]})]}),e.aboutRole&&(0,a.jsx)("p",{className:"text-sm text-gray-600 mt-1 whitespace-pre-line",children:e.aboutRole})]},t))})]}),(null===(g=en.devAcademic)||void 0===g?void 0:g.length)>0&&(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"text-lg font-semibold text-gray-800 mb-3",children:"Education"}),(0,a.jsx)("div",{className:"space-y-3",children:en.devAcademic.map((e,t)=>(0,a.jsxs)("div",{className:"flex justify-between items-start border-l-2 border-green-300 pl-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h4",{className:"font-semibold text-gray-800",children:e.degree||e.qualification||"Degree"}),(0,a.jsx)("p",{className:"text-sm text-gray-600",children:e.institution||e.college||e.collegeName}),e.specialization&&(0,a.jsx)("p",{className:"text-xs text-gray-400",children:e.specialization})]}),(0,a.jsx)("span",{className:"text-xs text-gray-400",children:e.passingYear||e.year||""})]},t))})]}),(null===(v=en.devCertificates)||void 0===v?void 0:v.length)>0&&(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"text-lg font-semibold text-gray-800 mb-3",children:"Certifications"}),(0,a.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-2",children:en.devCertificates.map((e,t)=>(0,a.jsxs)("div",{className:"flex items-center gap-2 p-2 bg-gray-50 rounded-lg",children:[(0,a.jsx)(R.A,{className:"w-4 h-4 text-yellow-500 flex-shrink-0"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"text-sm font-medium text-gray-800",children:e.name||e.title}),e.organization&&(0,a.jsxs)("span",{className:"text-xs text-gray-400 ml-1",children:["â ",e.organization]})]})]},t))})]}),(0,a.jsxs)("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4 p-4 bg-gray-50 rounded-lg text-sm",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"text-gray-400 block",children:"Current Salary"}),(0,a.jsx)("span",{className:"font-medium",children:en.devCSalar?"".concat(en.currency||"â¹").concat(en.devCSalar):"Not specified"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"text-gray-400 block",children:"Expected Salary"}),(0,a.jsx)("span",{className:"font-medium",children:en.devExpSalary?"".concat(en.currency||"â¹").concat(en.devExpSalary):"Not specified"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"text-gray-400 block",children:"Notice Period"}),(0,a.jsx)("span",{className:"font-medium",children:en.devNoticePeriod?"".concat(en.devNoticePeriod," days"):"Not specified"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"text-gray-400 block",children:"Available From"}),(0,a.jsx)("span",{className:"font-medium",children:en.devAvlFrom?V(en.devAvlFrom):"Immediately"})]})]}),(en.devLinkedin||en.devGithub||en.devPortfolio)&&(0,a.jsxs)("div",{className:"flex flex-wrap gap-3",children:[en.devLinkedin&&(0,a.jsx)("a",{href:en.devLinkedin,target:"_blank",rel:"noopener noreferrer",className:"text-sm text-blue-600 hover:underline",children:"LinkedIn"}),en.devGithub&&(0,a.jsx)("a",{href:en.devGithub,target:"_blank",rel:"noopener noreferrer",className:"text-sm text-gray-700 hover:underline",children:"GitHub"}
1),en.devPortfolio&&(0,a.jsx)("a",{href:en.devPortfolio,target:"_blank",rel:"noopener noreferrer",className:"text-sm text-green-600 hover:underline",children:"Portfolio"})]}),(0,a.jsxs)("div",{className:"border-t pt-6",children:[(0,a.jsx)("h3",{className:"text-lg font-semibold text-gray-800 mb-3",children:"Job Preferences"}),(0,a.jsxs)("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-4 text-sm",children:[(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:"Preferred Job Roles"}),(null===(L=en.devChooseSkills)||void 0===L?void 0:L.length)>0||(null===(O=en.devJobRole)||void 0===O?void 0:O.length)>0?(0,a.jsx)("div",{className:"flex flex-wrap gap-1",children:(en.devJobRole||en.devChooseSkills||[]).map((e,t)=>(0,a.jsx)("span",{className:"px-2 py-0.5 bg-blue-50 text-blue-700 text-xs rounded-full",children:e},t))}):(0,a.jsx)("span",{className:"text-gray-500",children:"Not set"})]}),(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:"Work Location Preference"}),(null===(W=en.locationPreference)||void 0===W?void 0:W.length)>0?(0,a.jsx)("div",{className:"flex flex-wrap gap-1",children:en.locationPreference.map((e,t)=>(0,a.jsx)("span",{className:"px-2 py-0.5 bg-green-50 text-green-700 text-xs rounded-full",children:e},t))}):(0,a.jsx)("span",{className:"text-gray-500",children:"Not set"})]}),(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:"Open to Relocate"}),(0,a.jsx)("span",{className:"font-medium",children:(null===(U=en.relocate)||void 0===U?void 0:U.anyWhere)?"Yes â Anywhere":(null===(q=en.relocate)||void 0===q?void 0:q.withinCountry)?"Within Country":(null===(G=en.relocate)||void 0===G?void 0:G.withinCity)?"Within City":"Not specified"})]}),(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:"Industry"}),(0,a.jsx)("span",{className:"font-medium",children:en.devIndustry||"Not set"})]})]})]}),(0,a.jsxs)("div",{className:"border-t pt-6",children:[(0,a.jsx)("h3",{className:"text-lg font-semibold text-gray-800 mb-3",children:"Personal Info"}),(0,a.jsx)("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-4 text-sm",children:[["Full Name",eY],["Email",en.email],["Phone",en.devMobile?"".concat(en.devCountryCode||"+91"," ").concat(en.devMobile):"Not set"],["Address",[en.devAddress,en.devCity,en.devState].filter(Boolean).join(", ")||"Not set"],["PIN Code",en.devPin||"Not set"],["Total Experience",en.devTotalExperience?"".concat(en.devTotalExperience," years"):"Not set"],["Headline",en.devHeadline||"Not set"],["Fresher",en.isFresher?"Yes":"No"]].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)})})]}),(null===($=en.devProjects)||void 0===$?void 0:$.length)>0&&(0,a.jsxs)("div",{className:"border-t pt-6",children:[(0,a.jsx)("h3",{className:"text-lg font-semibold text-gray-800 mb-3",children:"Projects"}),(0,a.jsx)("div",{className:"space-y-3",children:en.devProjects.map((e,t)=>(0,a.jsxs)("div",{className:"border-l-2 border-purple-300 pl-4",children:[(0,a.jsx)("h4",{className:"font-semibold text-gray-800",children:e.title}),e.clientName&&(0,a.jsx)("p",{className:"text-sm text-purple-600",children:e.clientName}),e.role&&(0,a.jsxs)("p",{className:"text-xs text-gray-500",children:["Role: ",e.role]}),e.description&&(0,a.jsx)("p",{className:"text-sm text-gray-600 mt-1",children:e.description})]},t))})]}),(null===(K=en.devAchievements)||void 0===K?void 0:K.length)>0&&(0,a.jsxs)("div",{className:"border-t pt-6",children:[(0,a.jsx)("h3",{className:"text-lg font-semibold text-gray-800 mb-3",children:"Achievements"}),(0,a.jsx)("div",{className:"space-y-2",children:en.devAchievements.map((e,t)=>(0,a.jsxs)("div",{className:"flex items-start gap-2 p-2 bg-yellow-50 rounded-lg",children:[(0,a.jsx)(R.A,{className:"w-4 h-4 text-yellow-500 flex-shrink-0 mt-0.5"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"text-sm font-medium text-gray-800",children:e.title}),e.description&&(0,a.jsx)("p",{className:"text-xs text-gray-500",children:e.description})]})]},t))})]})]}),eN?(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"flex justify-end mb-4",children:(0,a.jsxs)("button",{onClick:()=>ew(!1),className:"flex items-center gap-1.5 text-gray-600 hover:text-gray-800 text-sm",children:[(0,a.jsx)(b.A,{className:"w-4 h-4"})," Back to Profile View"]})}),(0,a.jsxs)("div",{className:"text-center",children:[(0,a.jsx)("h2",{className:"text-2xl font-bold text-gray-700 tracking-wide",children:eY}),(0,a.jsx)("div",{className:"flex items-center justify-end mt-2",children:(0,a.jsxs)("label",{className:"flex items-center gap-2 cursor-pointer",children:[(0,a.jsx)("input",{type:"checkbox",checked:!!en.isFresher,onCh
1ange:async()=>{try{await i.default.put("/admin-candidate/admin-candidates/".concat(ed,"/settings"),{field:"isFresher",value:!en.isFresher}),d.toast.success(en.isFresher?"Fresher removed":"Marked fresher"),eL()}catch(e){d.toast.error("Failed")}},className:"w-4 h-4 rounded border-gray-300 text-blue-600"}),(0,a.jsx)("span",{className:"text-sm text-gray-600",children:"Fresher"})]})})]}),(0,a.jsxs)("div",{className:"flex items-center justify-center gap-0",children:[(0,a.jsxs)("button",{onClick:()=>ef(1),className:"flex flex-col items-center cursor-pointer",children:[(0,a.jsx)("div",{className:"w-8 h-8 rounded-full flex items-center justify-center text-sm font-bold ".concat(ej>=1?"bg-blue-600 text-white":"bg-gray-300 text-gray-500"),children:"1"}),(0,a.jsx)("span",{className:"text-xs mt-1 ".concat(ej>=1?"font-medium text-gray-700":"text-gray-400"),children:"Create Your Profile"})]}),(0,a.jsx)("div",{className:"w-64 h-0.5 mx-2 ".concat(ej>=2?"bg-blue-600":"bg-gray-300")}),(0,a.jsxs)("button",{onClick:()=>ef(2),className:"flex flex-col items-center cursor-pointer",children:[(0,a.jsx)("div",{className:"w-8 h-8 rounded-full flex items-center justify-center text-sm font-bold ".concat(ej>=2?"bg-blue-600 text-white":"bg-gray-300 text-gray-500"),children:"2"}),(0,a.jsx)("span",{className:"text-xs mt-1 ".concat(ej>=2?"font-medium text-gray-700":"text-gray-400"),children:"Finalize Resume"})]})]}),1===ej&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"border rounded-lg p-6",children:[(0,a.jsx)("h3",{className:"text-base font-semibold text-gray-800 mb-4",children:"Create Profile"}),(0,a.jsx)("div",{className:"border-2 border-dashed border-gray-300 rounded-lg p-8 text-center",children:en.devResume?(0,a.jsxs)("div",{children:[(0,a.jsx)("a",{href:en.devResume,target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 hover:underline font-medium",children:"Preview"}),(0,a.jsx)("p",{className:"text-xs text-gray-400 mt-2",children:"To upload file size is (Max 5Mb) and allowed file types are (.doc, .docx, .pdf)"}),(0,a.jsx)("button",{className:"mt-3 bg-blue-600 text-white px-6 py-2 rounded-lg text-sm font-medium",children:"Reupload Resume"})]}):(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-gray-400",children:"No resume uploaded"}),(0,a.jsx)("p",{className:"text-xs text-gray-400 mt-1",children:"To upload file size is (Max 5Mb) and allowed file types are (.doc, .docx, .pdf)"})]})})]}),(0,a.jsx)(J,{candidate:en,devId:ed,onSave:eL,onNext:()=>ef(2),saveRef:ek}),en.feedBack&&en.feedBack.length>0&&(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,a.jsx)("h4",{className:"text-sm font-semibold text-gray-700",children:"Rejection Feedback History"}),(0,a.jsxs)("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 rounded-full bg-red-100 text-red-700 text-[11px] font-semibold",children:[(0,a.jsx)(F.A,{className:"w-3 h-3"})," Rejection"]})]}),(0,a.jsx)("p",{className:"text-xs text-gray-500 mb-2",children:"Reasons captured when this profile was rejected."}),(0,a.jsx)("div",{className:"space-y-2",children:en.feedBack.map((e,t)=>(0,a.jsxs)("div",{className:"bg-red-50 border border-red-100 rounded-lg p-3 text-sm",children:[(0,a.jsx)("p",{className:"text-[11px] uppercase tracking-wide text-red-500 font-semibold mb-1",children:"Rejection reason"}),(0,a.jsx)("p",{className:"text-red-700",children:e.reason}),(0,a.jsxs)("p",{className:"text-red-400 text-xs mt-1",children:["Rejected by ",e.name," on ",V(e.date)]})]},t))})]})]}),2===ej&&(0,a.jsxs)("div",{className:"space-y-6",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-sm text-gray-600 mb-3",children:"You can choose to either create Olibr Resume and display that on your profile or display your own resume on the profile."}),(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,a.jsxs)("button",{onClick:async()=>{try{await i.default.put("/admin-candidate/admin-candidates/".concat(ed,"/profile"),{isDevOwnResume:!1}),eL()}catch(e){console.error(e)}},className:"border-2 rounded-lg py-3 text-center text-sm font-medium ".concat(en.isDevOwnResume?"border-gray-200 text-gray-500":"border-blue-500 text-blue-600 bg-blue-50"),children:[en.isDevOwnResume?"â ":"â ","Create Olibr Resume"]}),(0,a.jsxs)("button",{onClick:async()=>{try{await i.default.put("/admin-candidate/admin-candidates/".concat(ed,"/profile"),{isDevOwnResume:!0}),eL()}catch(e){console.error(e)}},className:"border-2 rounded-lg py-3 text-center text-sm font-medium ".concat(en.isDevOwnResume?"border-blue-500 text-blue-600 bg-blue-50":"border-gray-200 text-gray-500"),children:[en.isDevOwnResume?"â ":"â ","Dis
1play My Own Resume"]})]}),(0,a.jsx)("div",{className:"bg-yellow-50 border border-yellow-200 rounded-lg p-3 mt-3 text-xs text-yellow-800",children:"Note: Clients will view only your Olibr digital profile, not your physical resume, so completeness is crucial."})]}),(0,a.jsxs)("div",{className:"border rounded-lg p-5",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,a.jsx)("h4",{className:"text-base font-semibold text-gray-800",children:"My Profile"}),(0,a.jsxs)("span",{className:"text-sm",children:["Profile Status: ",(0,a.jsx)("span",{className:"font-medium ".concat("approved"===en.devStatus?"text-green-600":"rejected"===en.devStatus?"text-red-600":"text-yellow-600"),children:en.devStatus?en.devStatus.charAt(0).toUpperCase()+en.devStatus.slice(1):"N/A"})]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-4",children:[en.devPhoto?(0,a.jsx)("img",{src:(0,n.tN)(en.devPhoto),alt:"",className:"w-20 h-20 rounded-full object-cover border-2"}):(0,a.jsx)("div",{className:"w-20 h-20 rounded-full bg-gray-200 flex items-center justify-center text-2xl font-bold text-gray-400",children:((null===(X=en.fName)||void 0===X?void 0:X[0])||"?").toUpperCase()}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-lg font-semibold text-gray-800",children:eY}),(0,a.jsx)("p",{className:"text-xs text-gray-400",children:"Maximum File Size: 0.5MB Minimum Dimensions: 300x300 pixels Accepted File Formats: JPG, PNG"})]})]})]}),(0,a.jsxs)("div",{className:"border rounded-lg p-5",children:[(0,a.jsx)("h4",{className:"text-base font-semibold text-gray-800 mb-1",children:"Tell Your Story*"}),(0,a.jsx)("p",{className:"text-xs text-gray-400 mb-3",children:"Summarize your professional experience in 70 words or less."}),(0,a.jsx)("div",{className:"bg-yellow-50 rounded-lg p-4 text-sm text-gray-600",children:en.devAbout||(0,a.jsx)("span",{className:"text-gray-400 italic",children:"No story added"})})]}),(0,a.jsxs)("div",{className:"border rounded-lg p-5",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,a.jsx)("h4",{className:"text-base font-semibold text-gray-800",children:"Education*"}),(0,a.jsxs)("button",{onClick:()=>{eD("education"),eR({}),eC(!0)},className:"flex items-center gap-1 text-sm text-pink-500 hover:text-pink-700",children:[(0,a.jsx)(E.A,{className:"w-4 h-4"})," Add Education"]})]}),(null===(Q=en.devEducation)||void 0===Q?void 0:Q.length)>0?en.devEducation.map((e,t)=>(0,a.jsxs)("div",{className:"flex items-start justify-between py-2 border-b last:border-0",children:[(0,a.jsxs)("div",{children:[(0,a.jsxs)("p",{className:"font-medium text-sm",children:[e.degree||e.collegeName," ",e.stream?"- ".concat(e.stream):""]}),(0,a.jsx)("p",{className:"text-xs text-gray-500",children:e.collegeName}),(0,a.jsxs)("p",{className:"text-xs text-gray-400",children:[e.startDate?V(e.startDate):""," - ",e.endDate?V(e.endDate):""]})]}),(0,a.jsx)("button",{onClick:async()=>{try{await i.default.delete("/admin-candidate/admin-candidates/".concat(ed,"/education/").concat(e._id)),d.toast.success("Deleted"),eL()}catch(e){d.toast.error("Failed")}},className:"p-1 text-red-400 hover:text-red-600",children:(0,a.jsx)(N.A,{className:"w-4 h-4"})})]},e._id||t)):(0,a.jsx)("p",{className:"text-gray-400 text-sm",children:"No education added"})]}),(0,a.jsxs)("div",{className:"border rounded-lg p-5",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,a.jsx)("h4",{className:"text-base font-semibold text-gray-800",children:"Employment Information*"}),(0,a.jsxs)("button",{onClick:()=>{eD("employment"),eR({}),eC(!0)},className:"flex items-center gap-1 text-sm text-pink-500 hover:text-pink-700",children:[(0,a.jsx)(E.A,{className:"w-4 h-4"})," Add Work"]})]}),(null===(Z=en.devEmployment)||void 0===Z?void 0:Z.length)>0?en.devEmployment.map((e,t)=>{var s,l;return(0,a.jsxs)("div",{className:"border-l-2 border-blue-300 pl-4 py-3 mb-3 last:mb-0",children:[(0,a.jsxs)("div",{className:"flex items-start justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("div",{className:"w-6 h-6 rounded-full bg-blue-100 flex items-center justify-center text-xs font-bold text-blue-600",children:((null===(s=e.companyName)||void 0===s?void 0:s[0])||"?").toUpperCase()}),(0,a.jsx)("p",{className:"font-medium text-sm",children:e.designation}),(0,a.jsxs)("span",{className:"text-xs bg-green-50 text-green-600 px-2 py-0.5 rounded",children:[e.startDate?V(e.startDate):"N/A"," - ",e.isCurrent?"Present":e.endDate?V(e.endDate):"N/A"]})]}),(0,a.jsx)("p",{className:"text-xs text-blue-600 ml-8",children:e.companyName})]}),(0,a.jsx)("button",{onClick:async()=>{try{await i.default.delete("/admin-candidate/admin-candidates/".concat(ed,"/employment/").concat(e._id)),d.toast.success("Deleted"),eL()}catch(e){d.toast.error("Failed")}},className:"p-1 text-red-400 hover:text-red-600",children:(0,a.jsx)(N.A,{className:"w-4 h-4"})})]}),(null===(l=e.technologies)||void 0===l?void 0:l.length)>0&&(0,a.jsxs)("p",{className:"text-xs text-red-500 font-medium ml-8 mt-1",children:["Technology: ",e.technologies.join(", ")
1]}),e.description&&(0,a.jsxs)("p",{className:"text-xs text-gray-500 ml-8 mt-1",children:[e.description.substring(0,100),"..."]})]},e._id||t)}):(0,a.jsx)("p",{className:"text-gray-400 text-sm",children:"No employment added"})]}),(0,a.jsxs)("div",{className:"border rounded-lg p-5",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,a.jsx)("h4",{className:"text-base font-semibold text-gray-800",children:"Additional Projects"}),(0,a.jsxs)("button",{onClick:()=>{eD("project"),eR({}),eC(!0)},className:"flex items-center gap-1 text-sm text-pink-500 hover:text-pink-700",children:[(0,a.jsx)(E.A,{className:"w-4 h-4"})," Add Project"]})]}),(null===(ee=en.devProjects)||void 0===ee?void 0:ee.length)>0?en.devProjects.map((e,t)=>(0,a.jsxs)("div",{className:"flex items-start justify-between py-2 border-b last:border-0",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium text-sm",children:e.title}),e.clientName&&(0,a.jsx)("p",{className:"text-xs text-gray-500",children:e.clientName}),e.description&&(0,a.jsxs)("p",{className:"text-xs text-gray-400 mt-0.5",children:[e.description.substring(0,80),"..."]})]}),(0,a.jsx)("button",{onClick:async()=>{try{await i.default.delete("/admin-candidate/admin-candidates/".concat(ed,"/project/").concat(e._id)),d.toast.success("Deleted"),eL()}catch(e){d.toast.error("Failed")}},className:"p-1 text-red-400 hover:text-red-600",children:(0,a.jsx)(N.A,{className:"w-4 h-4"})})]},e._id||t)):(0,a.jsx)("p",{className:"text-gray-400 text-sm",children:"No projects"})]}),(0,a.jsxs)("div",{className:"border rounded-lg p-5",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,a.jsx)("h4",{className:"text-base font-semibold text-gray-800",children:"Certifications"}),(0,a.jsxs)("button",{onClick:()=>{eD("certification"),eR({}),eC(!0)},className:"flex items-center gap-1 text-sm text-pink-500 hover:text-pink-700",children:[(0,a.jsx)(E.A,{className:"w-4 h-4"})," Add Certifications"]})]}),(null===(et=en.devCertificates)||void 0===et?void 0:et.length)>0?en.devCertificates.map((e,t)=>(0,a.jsxs)("div",{className:"flex items-center justify-between py-2 border-b last:border-0",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-sm font-medium",children:e.name}),e.organization&&(0,a.jsx)("p",{className:"text-xs text-gray-500",children:e.organization})]}),(0,a.jsx)("button",{onClick:async()=>{try{await i.default.delete("/admin-candidate/admin-candidates/".concat(ed,"/certification/").concat(e._id)),d.toast.success("Deleted"),eL()}catch(e){d.toast.error("Failed")}},className:"p-1 text-red-400 hover:text-red-600",children:(0,a.jsx)(N.A,{className:"w-4 h-4"})})]},e._id||t)):(0,a.jsx)("p",{className:"text-gray-400 text-sm",children:"No certifications"})]}),(0,a.jsxs)("div",{className:"border rounded-lg p-5",children:[(0,a.jsx)("h4",{className:"text-base font-semibold text-gray-800 mb-3",children:"Social Profiles"}),(0,a.jsx)("div",{className:"grid grid-cols-2 gap-4",children:[["GitHub","devGithub"],["LinkedIn","devLinkedin"],["Twitter","devTwitter"],["Facebook","devFacebook"]].map(e=>{let[t,s]=e;return(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:t}),(0,a.jsx)("input",{type:"text",defaultValue:en[s]||"",onBlur:async e=>{if(e.target.value!==(en[s]||""))try{await i.default.put("/admin-candidate/admin-candidates/".concat(ed,"/profile"),{[s]:e.target.value}),d.toast.success("".concat(t," updated"))}catch(e){d.toast.error("Failed")}},className:"w-full border rounded-lg px-3 py-2 text-sm bg-gray-50 outline-none focus:ring-2 focus:ring-blue-500"})]},s)})})]}),(0,a.jsxs)("div",{className:"border rounded-lg p-5",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,a.jsx)("h4",{className:"text-base font-semibold text-gray-800",children:"Achievements"}),(0,a.jsxs)("button",{onClick:()=>{eD("achievement"),eR({}),eC(!0)},className:"flex items-center gap-1 text-sm text-pink-500 hover:text-pink-700",children:[(0,a.jsx)(E.A,{className:"w-4 h-4"})," Add Achievement"]})]}),(null===(es=en.devAchievements)||void 0===es?void 0:es.length)>0?en.devAchievements.map((e,t)=>(0,a.jsxs)("div",{className:"flex items-start justify-between py-2 border-b last:border-0",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-sm font-medium",children:e.title}),e.description&&(0,a.jsx)("p",{className:"text-xs text-gray-400",children:e.description})]}),(0,a.jsx)("button",{onClick:async()=>{try{await i.default.delete("/admin-candidate/admin-candidates/".concat(ed,"/achievement/").concat(e._id)),d.toast.success("Deleted"),eL()}catch(e){d.toast.error("Failed")}},className:"p-1 text-red-400 hover:text-red-600",children:(0,a.jsx)(N.A,{className:"w-4 h-4"})})]},e._id||t)):(0,a.jsx)("p",{className:"text-gray-400 text-sm",children:"No achievements"})]})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between pt-4 border-t",children:[(0,a.jsxs)("button",{onClick:()=>{ej>1&&ef(ej-1)},disabled:1===ej,className:"flex items-center gap-1 text-sm ".concat(1===ej?"text-gray-300 cursor-not-allowed":"text-gray-600 hover:text-gray-800"),children:[(0,a.jsx)(b.A,{className:"w-4 h-4"})," BACK"]}),(0,a.jsxs)("button",{onClick:async()=>
1{1===ej&&ek.current?await ek.current():ej<2&&ef(ej+1)},disabled:2===ej,className:"flex items-center gap-1 text-sm font-medium ".concat(2===ej?"text-gray-300 cursor-not-allowed":"text-blue-600 hover:text-blue-800"),children:["NEXT ",(0,a.jsx)(M.A,{className:"w-4 h-4"})]})]})]}):null]}),"assessments"===em&&(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,a.jsx)("h3",{className:"text-lg font-semibold text-gray-800",children:"Assessment Results"}),(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsxs)("span",{className:"text-sm text-gray-500",children:["Credits: ",(0,a.jsx)("strong",{children:en.devAssessmentCredits||0})]}),(0,a.jsx)("button",{onClick:async()=>{let e=prompt("How many assessment credits to add?","5");if(!(!e||isNaN(parseInt(e))))try{await i.default.put("/admin-candidate/admin-candidates/".concat(ed,"/credits"),{creditType:"devAssessmentCredits",amount:parseInt(e),action:"add"}),d.toast.success("Added ".concat(e," assessment credits")),eL()}catch(e){d.toast.error("Failed to add credits")}},className:"text-xs bg-green-600 text-white px-3 py-1.5 rounded-lg hover:bg-green-700 font-medium",children:"+ Grant Credits"})]})]}),(null===(ea=en.devTechTestResult)||void 0===ea?void 0:ea.filter(e=>"passed"===e.status||"failed"===e.status).length)>0&&(0,a.jsxs)("div",{className:"mb-6",children:[(0,a.jsxs)("h4",{className:"text-sm font-medium text-green-700 flex items-center gap-2 mb-3",children:[(0,a.jsx)(I.A,{className:"w-4 h-4"})," Assessment Taken"]}),(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:"Test Name"}),(0,a.jsx)("th",{className:"text-left px-4 py-2.5 font-medium text-gray-600",children:"Duration"}),(0,a.jsx)("th",{className:"text-left px-4 py-2.5 font-medium text-gray-600",children:"Score"}),(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:"Platform"}),(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-right px-4 py-2.5 font-medium text-gray-600",children:"Actions"})]})}),(0,a.jsx)("tbody",{className:"divide-y",children:en.devTechTestResult.filter(e=>"passed"===e.status||"failed"===e.status).map((e,t)=>{let s=e.maxScore>0?Math.round(e.obtainedScore/e.maxScore*100):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)(x.A,{className:"w-4 h-4 text-gray-400"}),(0,a.jsx)("span",{className:"font-medium text-gray-800",children:e.testName||"Assessment"})]})}),(0,a.jsx)("td",{className:"px-4 py-3 text-gray-600",children:e.testDuration?"".concat(e.testDuration," Min"):"-"}),(0,a.jsxs)("td",{className:"px-4 py-3 font-medium",children:[Math.ceil(e.obtainedScore||0),"/",e.maxScore||100," ",(0,a.jsxs)("span",{className:"text-xs text-gray-400",children:["(",s,"%)"]})]}),(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("passed"===e.status?"bg-green-100 text-green-700":"bg-red-100 text-red-700"),children:"passed"===e.status?"Passed":"Failed"})}),(0,a.jsx)("td",{className:"px-4 py-3",children:(0,a.jsx)("div",{className:"w-7 h-7 rounded-lg flex items-center justify-center text-white text-xs font-bold ".concat(e.isHackerearth?"bg-blue-600":"bg-black"),children:e.isHackerearth?"HE":"HR"})}),(0,a.jsx)("td",{className:"px-4 py-3 text-xs text-gray-500",children:V(e.attemptEndedAt||e.createdAt)}),(0,a.jsx)("td",{className:"px-4 py-3 text-right",children:(0,a.jsx)("button",{onClick:async()=>{if(confirm("Remove this ".concat(e.testName," result? This cannot be undone.")))try{await i.default.delete("/admin-candidate/admin-candidates/".concat(ed,"/assessment/").concat(e._id)),d.toast.success("Assessment result removed"),eL()}catch(e){d.toast.error("Failed to remove")}},className:"text-xs text-red-500 hover:text-red-700 hover:underline",children:"Remove"})})]},t)})})]})})]}),(null===(el=en.devTechTestResult)||void 0===el?void 0:el.filter(e=>"initiated"===e.status).length)>0&&(0,a.jsxs)("div",{className:"mb-6",children:[(0,a.jsxs)("h4",{className:"text-sm font-medium text-yellow-700 flex items-center gap-2 mb-3",children:[(0,a.jsx)(T.A,{className:"w-4 h-4"})," In Progress"]}),(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:"Test Name"}),(0,a.jsx)("th",{className:"text-left px-4 py-2.5 font-medium text-gray-600",children:"Platform"}),(0,a.jsx)("th",{className:"text-left px-4 py-2.5 font-medium text-gray-600",children:"Started"}),(0,a.jsx)("th",{className:"text-left px-4 py-2.5 font-medium text-gray-600",children:"Status"})]})}),(0,a.jsx)("tbody",{className:"divide-y",children:en.devTechTestResult.filter(e=>"initiated"===e.status).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.testName||"Assessment"}),(0,a.jsx)("td",{className:"px-4 py-3",children:(0,a.jsx)("div",{className:"w-7 h-7 rounded-lg flex items-center justify-center text-white text-xs font-bold ".concat(e.isHackerearth?"bg-blue-600":"bg-black"),children:e.isHackerearth?"HE":"HR"})}),(0,a.jsx)("td",{className:"px-4 py-3 text-xs text-gray-500",children:V(e.attemptStartedAt||e.createdAt)}),(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 bg-yellow-100 text-yellow-700",children:"In Progress"})})]},t))})]})})]}),(!en.devTechTestResult||0===en.devTechTestResult.length)&&(0,a.jsx)("p",{className:"text-gray-500",children:"No assessments taken yet"})]}),"reviews"===em&&(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"text-lg font-semibold text-gray-800 mb
1-4",children:"Reviews"}),(null===(er=en.devReviews)||void 0===er?void 0:er.length)>0?(0,a.jsx)("div",{className:"overflow-x-auto",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-3 py-2 font-medium text-gray-600",children:"Reviewer"}),(0,a.jsx)("th",{className:"text-left px-3 py-2 font-medium text-gray-600",children:"Email"}),(0,a.jsx)("th",{className:"text-left px-3 py-2 font-medium text-gray-600",children:"Company"}),(0,a.jsx)("th",{className:"text-left px-3 py-2 font-medium text-gray-600",children:"Status"}),(0,a.jsx)("th",{className:"text-left px-3 py-2 font-medium text-gray-600",children:"Rating"}),(0,a.jsx)("th",{className:"text-right px-3 py-2 font-medium text-gray-600",children:"Actions"})]})}),(0,a.jsx)("tbody",{className:"divide-y",children:en.devReviews.map((e,t)=>{let s=Object.values(e.rateParams||{}).filter(e=>"number"==typeof e),l=s.length?(s.reduce((e,t)=>e+t,0)/s.length).toFixed(1):"-";return(0,a.jsxs)("tr",{className:"hover:bg-gray-50",children:[(0,a.jsx)("td",{className:"px-3 py-2 font-medium",children:e.receiverName}),(0,a.jsx)("td",{className:"px-3 py-2 text-gray-500",children:e.receiverEmail}),(0,a.jsx)("td",{className:"px-3 py-2 text-gray-500",children:e.companyName}),(0,a.jsx)("td",{className:"px-3 py-2",children:(0,a.jsx)(_,{status:e.status})}),(0,a.jsx)("td",{className:"px-3 py-2",children:"done"===e.status?(0,a.jsxs)("span",{className:"text-yellow-600 font-medium",children:[l,"/5"]}):"-"}),(0,a.jsxs)("td",{className:"px-3 py-2 text-right",children:["pending"===e.status&&(0,a.jsx)("button",{onClick:async()=>{try{await i.default.put("/candidate/reviews/".concat(e._id,"/resend")),d.toast.success("Resent"),eL()}catch(e){d.toast.error("Failed")}},className:"text-xs text-blue-600 hover:underline mr-2",children:"Resend"}),"done"!==e.status&&(0,a.jsx)("button",{onClick:async()=>{try{await i.default.delete("/candidate/reviews/".concat(e._id)),d.toast.success("Deleted"),eL()}catch(e){d.toast.error("Failed")}},className:"text-xs text-red-500 hover:underline",children:"Delete"})]})]},e._id||t)})})]})}):(0,a.jsx)("p",{className:"text-gray-500",children:"No reviews yet"})]}),"video"===em&&(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"text-lg font-semibold text-gray-800 mb-4",children:"Video Introduction"}),en.devVideo?(0,a.jsxs)("div",{className:"space-y-4",children:[(0,a.jsx)("video",{src:(0,n.tN)(en.devVideo),controls:!0,className:"w-full max-w-xl rounded-lg aspect-video bg-gray-900"}),en.devVideoStatus&&(0,a.jsxs)("div",{className:"inline-flex items-center gap-2 px-3 py-1.5 rounded-full text-sm font-medium ".concat("approved"===en.devVideoStatus?"bg-green-100 text-green-700":"rejected"===en.devVideoStatus?"bg-red-100 text-red-700":"bg-amber-100 text-amber-700"),children:["Status: ",en.devVideoStatus,en.devVideoReviewedBy&&(0,a.jsxs)("span",{className:"text-xs opacity-75",children:["by ",en.devVideoReviewedBy]})]}),en.devVideoFeedback&&(0,a.jsxs)("p",{className:"text-sm text-gray-600 bg-gray-50 p-3 rounded-lg",children:["Feedback: ",en.devVideoFeedback]}),(0,a.jsxs)("div",{className:"flex items-center gap-3 pt-2",children:[(0,a.jsxs)("button",{onClick:async()=>{try{await i.default.put("/admin-candidate/admin-candidates/".concat(ed,"/video/review"),{action:"approved"}),d.toast.success("Video approved"),eL()}catch(e){d.toast.error("Failed")}},disabled:"approved"===en.devVideoStatus,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 disabled:opacity-50",children:[(0,a.jsx)(I.A,{className:"w-4 h-4"})," Approve"]}),(0,a.jsxs)("button",{onClick:async()=>{let e=prompt("Rejection reason (optional):");try{await i.default.put("/admin-candidate/admin-candidates/".concat(ed,"/video/review"),{action:"rejected",feedback:e||""}),d.toast.success("Video rejected"),eL()}catch(e){d.toast.error("Failed")}},disabled:"rejected"===en.devVideoStatus,className:"flex items-center gap-1.5 bg-red-600 text-white px-4 py-2 rounded-lg text-sm font-medium hover:bg-red-700 disabled:opacity-50",children:[(0,a.jsx)(F.A,{className:"w-4 h-4"})," Reject"]}),(0,a.jsx)("button",{onClick:async()=>{let e=prompt("Message to candidate (optional):");try{await i.default.put("/admin-candidate/admin-candidates/".concat(ed,"/video/review"),{action:"request_reupload",feedback:e||"Please re-upload your video introduction"}),d.toast.success("Re-upload requested â video cleared"),eL()}catch(e){d.toast.error("Failed")}},className:"flex items-center gap-1.5 bg-amber-500 text-white px-4 py-2 rounded-lg text-sm font-medium hover:bg-amber-600",children:"Request Re-upload"})]})]}):(0,a.jsx)("p",{className:"text-gray-500",children:"No video uploaded"})]}),"settings"===em&&(0,a.jsxs)("div",{className:"space-y-1",children:[(0,a.jsx)("h3",{className:"text-lg font-semibold text-gray-800 mb
1-4",children:"Settings"}),(0,a.jsxs)("div",{className:"flex items-center justify-between py-3 border-b",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"Snooze"}),(0,a.jsx)("p",{className:"text-xs text-gray-400",children:"When enabled, clients cannot contact this developer"})]}),(0,a.jsx)("button",{onClick:async()=>{try{await i.default.put("/admin-candidate/admin-candidates/".concat(ed,"/settings"),{field:"isProfileSnooze",value:!en.isProfileSnooze}),d.toast.success(en.isProfileSnooze?"Snooze disabled":"Snooze enabled"),eL()}catch(e){d.toast.error("Failed")}},className:"relative w-11 h-6 rounded-full transition-colors ".concat(en.isProfileSnooze?"bg-blue-600":"bg-gray-300"),children:(0,a.jsx)("span",{className:"absolute top-0.5 left-0.5 w-5 h-5 bg-white rounded-full transition-transform ".concat(en.isProfileSnooze?"translate-x-5":"")})})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between py-3 border-b",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"Allow Without Assessment"}),(0,a.jsx)("p",{className:"text-xs text-gray-400",children:"Skip assessment requirement for this candidate"})]}),(0,a.jsx)("button",{onClick:async()=>{try{await i.default.put("/admin-candidate/admin-candidates/".concat(ed,"/settings"),{field:"allowWithOutAssessment",value:!en.allowWithOutAssessment}),d.toast.success("Updated"),eL()}catch(e){d.toast.error("Failed")}},className:"relative w-11 h-6 rounded-full transition-colors ".concat(en.allowWithOutAssessment?"bg-blue-600":"bg-gray-300"),children:(0,a.jsx)("span",{className:"absolute top-0.5 left-0.5 w-5 h-5 bg-white rounded-full transition-transform ".concat(en.allowWithOutAssessment?"translate-x-5":"")})})]}),[["Blocked",en.isBlocked?"YES":"NO"],["Number Verified",en.numberVerified?"YES":"NO"],["Assessment Credits",en.devAssessmentCredits||0],["Interview Credits",en.devInterviewCredits||0],["Resume Credits",en.devResumeCredits||0]].map((e,t)=>{let[s,l]=e;return(0,a.jsxs)("div",{className:"flex items-center justify-between py-3 border-b last:border-0",children:[(0,a.jsx)("span",{className:"text-sm font-medium text-gray-700",children:s}),(0,a.jsx)("span",{className:"text-sm text-gray-600",children:String(l)})]},t)}),"approved"===en.devStatus&&(0,a.jsxs)("div",{className:"flex items-center justify-between py-4 mt-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"text-sm font-medium text-red-600",children:"Deactivate Profile"}),(0,a.jsx)("p",{className:"text-xs text-gray-400",children:"Profile will no longer be visible to anyone"})]}),(0,a.jsx)("button",{onClick:async()=>{if(confirm("Deactivate this developer's profile?"))try{await i.default.put("/admin-candidate/admin-candidates/".concat(ed,"/status"),{status:"rejected",feedback:"Profile deactivated by admin"}),d.toast.success("Profile deactivated"),eL()}catch(e){d.toast.error("Failed")}},className:"bg-red-600 text-white px-4 py-2 rounded-lg text-sm font-medium hover:bg-red-700",children:"Deactivate"})]})]}),"job-assessments"===em&&(0,a.jsx)(B,{email:en.email}),"saved-jobs"===em&&(0,a.jsx)(Y,{userId:en.userId||en._id}),"services"===em&&(0,a.jsxs)("div",{className:"space-y-6",children:[(0,a.jsx)("h3",{className:"text-lg font-semibold text-gray-800",children:"Services & Credits"}),(0,a.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[{key:"devAssessmentCredits",label:"Assessment Credits",color:"blue"},{key:"devInterviewCredits",label:"Interview Credits",color:"purple"},{key:"devResumeCredits",label:"Resume Credits",color:"green"}].map(e=>{let{key:t,label:s,color:l}=e;return(0,a.jsxs)("div",{className:"border rounded-xl p-4 bg-".concat(l,"-50/50"),children:[(0,a.jsx)("span",{className:"text-sm text-gray-500",children:s}),(0,a.jsx)("div",{className:"text-2xl font-bold text-gray-800 mt-1",children:en[t]||0}),(0,a.jsxs)("div",{className:"flex items-center gap-2 mt-3",children:[(0,a.jsx)("input",{type:"number",min:"1",defaultValue:"1",id:"credit-amount-".concat(t),className:"w-20 px-2 py-1.5 border rounded-lg text-sm text-center"}),(0,a.jsx)("button",{onClick:async()=>{var e,a,l;let r=(null===(e=document.getElementById("credit-amount-".concat(t)))||void 0===e?void 0:e.value)||"1";try{await i.default.put("/admin-candidate/admin-candidates/".concat(ed,"/credits"),{creditType:t,amount:parseInt(r),action:"add"}),d.toast.success("Added ".concat(r," ").concat(s)),eL()}catch(e){d.toast.error((null==e?void 0:null===(l=e.response)||void 0===l?void 0:null===(a=l.data)||void 0===a?void 0:a.message)||"Failed")}},className:"px-3 py-1.5 bg-green-600 text-white text-sm rounded-lg hover:bg-green-700 font-medium",children:"+ Add"}),(0,a.jsx)("button",{onClick:async()=>{var e,a,l;let r=(null===(e=document.getElementById("credit-amount-".concat(t)))||void 0===e?void 0:e.value)||"1";try{await i.default.put("/admin-candidate/admin-candidates/".concat(ed,"/credits"),{creditType:t,amount:parseInt(r),action:"subtract"}),d.toast.success("Deducted ".concat(r," ").concat(s)),eL()}catch(e){d.toast.error((null==e?void 0:null===(l=e.response)||void 0===l?void 0:null===(a=l.data)||void 0===a?void 0:a.message)||"Failed")}},className:"px-3 py-1.5 bg-red-100 text-red-700 text-sm rounded-lg hover:bg-red-200 font-medium",children:"- Remove"})]})]},t)})})]})]})]}),eA&&(0,a.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/40",children:(0,a.jsxs)("div",{className:"bg-white rounded-xl shadow-xl w-full max-w-lg mx-4 p-6 max-h-[85vh] overflow-y-auto",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-5",children:[(0,a.jsx)("h2",{className:"text-lg font-semibold text-gray-800",children:"employment"===eS?"Add Employment Information":"education"===eS?"Add Academic Information":"project"===eS?"Add Project":"certification"===eS?"Add Certification":"Add Achievement"}),(0,a.jsx)("button",{onClick:()=>eC(!1),className:"p-1 hover:bg-gray-100 rounded-md",children:(0,a.jsx)(F.A,{className:"w-5 h-5 text-gray-500"})})]}),(0,a.jsxs)("div",{className:"space-y-4",children:["employment"===eS&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Designation*"}),(0,a.jsx)("input",{type:"text",value:eP.designation||"",onChange:e=>eR({...eP,designation:e.target.value}),className:"w-full border rounded-lg px-3 py-2.5 text-sm bg-gray-50 outline-none focus:ring-2 focus:ring-blue-500",placeholder:"Designation"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Company Name*"}),(0,a.jsx)("input",{type:"text",value:eP.companyName||"",onChange:e=>eR({...eP,companyName:e.target.value}),className:"w-full border rounded-lg px-3 py-2.5 text-sm bg-gray-50 outline-none focus:ring-2 focus:ring-blue-500",placeholder:"Company Name"})]})]}),(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"From"}),(0,a.jsx)(z.A,{initialView:"fullDate",formik:eI,name:"startDate",placeholder:"Select date"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"To"}),eP.isCurrent?(0,a.jsx)("input",{type:"text",value:"Present",disabled:!0,className:"w-full border rounded-lg px-3 py-2.5 text-sm bg-gray-100 text-gray-500 cursor-not-allowed"}):(0,a.jsx)(z.A,{initialView:"fullDate",formik:eI,name:"endDate",placeholder:"Select date"})]})]}),(0,a.jsxs)("label",{className:"flex items-center gap-2",children:[(0,a.jsx)("input",{type:"checkbox",checked:!!eP.isCurrent,onChange:e=>eR({...eP,isCurrent:e.target.checked}),className:"w-4 h-4"}),(0,a.jsx)("span",{className:"text-sm text-gray-600",children:"Still Working Here"})]}),(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Technologies*"}),(0,a.jsx)("input",{type:"text",value:eP.technologies||"",onChange:e=>eR({...eP,technologies:e.target.value}),className:"w-full border rounded-lg px-3 py-2.5 text-sm bg-gray-50 outline-none focus:ring-2 focus:ring-blue-500",placeholder:"React, Node.js, ..."})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Tools"}),(0,a.jsx)("input",{type:"text",value:eP.tools||"",onChange:e=>eR({...eP,tools:e.target.value}),className:"w-full border rounded-lg px-3 py-2.5 text-sm bg-gray-50 outline-none focus:ring-2 focus:ring-blue-500",placeholder:"VS Code, Jira, ..."})]})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Describe your current role"}),(0,a.jsx)("textarea",{value:eP.description||"",onChange:e=>eR({...eP,description:e.target.value}),rows:3,className:"w-full border rounded-lg px-3 py-2 text-sm bg-gray-50 outline-none focus:ring-2 focus:ring-blue-500 resize-none"})]})]}),"education"===eS&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Name Of The Institute*"}),(0,a.jsx)("input",{type:"text",value:eP.collegeName||"",onChange:e=>eR({...eP,collegeName:e.target.value}),className:"w-full border rounded-lg px-3 py-2.5 text-sm bg-gray-50 outline-none focus:ring-2 focus:ring-blue-500",placeholder:"Name Of The Institute"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Specialization*"}),(0,a.jsx)("input",{type:"text",value:eP.degree||"",onChange:e=>eR({...eP,degree:e.target.value}),className:"w-full border rounded-lg px-3 py-2.5 text-sm bg-gray-50 outline-none focus:ring-2 focus:ring-blue-500",placeholder:"Specialization"})]})]}),(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsxs)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:["From",(0,a.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,a.jsx)(z.A,{initialView:"fullDate",formik:eI,name:"startDate",placeholder:"Select date"})]}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:["To",(0,a.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,a.jsx)(z.A,{initialView:"fullDate",formik:eI,name:"endDate",placeholder:"Select date"})]})]})]}),"project"===eS&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsxs)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:["Project Name",(0,a.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,a.jsx)("input",{type:"text",value:eP.title||"",onChange:e=>eR({...eP,title:e.target.value}),className:"w-full border rounded-lg px-3 py-2.5 text-sm bg-gray-50 outline-none focus:ring-2 focus:ring-blue-500"})]}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:["Client Name",(0,a.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,a.jsx)("input",{type:"text",value:eP.clientName||"",onChange:e=>eR({...eP,clientName:e.target.value}),className:"w-full border rounded-lg px-3 py-2.5 text-sm bg-gray-50 outline-none focus:ring-2 focus:ring-blue-500"})]})]}),(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsxs)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:["Role",(0,a.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,a.jsx)("input",{type:"text",value:eP.role||"",onChange:e=>eR({...eP,role:e.target.value}),className:"w-full border rounded-lg px-3 py-2.5 text-sm bg-gray-50 outline-none focus:ring-2 focus:ring-blue-500"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Project Links"}),(0,a.jsx)("input",{type:"text",value:eP.projectLink||"",onChange:e=>eR({...eP,projectLink:e.target.value}),className:"w-full border rounded-lg px-3 py-2.5 text-sm bg-gray-50 outline-none focus:ring-2 focus:ring-blue-500"})]})]}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:["Project Description",(0,a.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,a.jsx)("textarea",{value:eP.description||"",onChange:e=>eR({...eP,description:e.target.value}),rows:3,className:"w-full border rounded-lg px-3 py-2 text-sm bg-gray-50 outline-none focus:ring-2 focus:ring-blue-500 resize-none"})]}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:["Roles and Responsibilities",(0,a.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,a.jsx)("textarea",{value:eP.responsibilities||"",onChange:e=>eR({...eP,responsibilities:e.target.value}),rows:3,className:"w-full border rounded-lg px-3 py-2 text-sm bg-gray-50 outline-none focus:ring-2 focus:ring-blue-500 resize-none"})]}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:["Add Skills",(0,a.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,a.jsx)("input",{type:"text",value:eP.skills||"",onChange:e=>eR({...eP,skills:e.target.value}),className:"w-full border rounded-lg px-3 py-2.5 text-sm bg-gray-50 outline-none focus:ring-2 focus:ring-blue-500",placeholder:"React, Node.js, ..."})]})]}),"certification"===eS&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsxs)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:["Certification Name ",(0,a.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,a.jsx)("input",{type:"text",value:eP.name||"",onChange:e=>eR({...eP,name:e.target.value}),className:"w-full border rounded-lg px-3 py-2.5 text-sm bg-gray-50 outline-none focus:ring-2 focus:ring-blue-500",placeholder:"Certificate Name"})]}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:["Name of the Institution",(0,a.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,a.jsx)("input",{type:"text",value:eP.organization||"",onChange:e=>eR({...eP,organization:e.target.value}),className:"w-full border rounded-lg px-3 py-2.5 text-sm bg-gray-50 outline-none focus:ring-2 focus:ring-blue-500",placeholder:"Name of the Institution"})]})]}),(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Start Date"}),(0,a.jsx)(z.A,{initialView:"fullDate",formik:eI,name:"startDate",placeholder:"Select date"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"End Date"}),(0,a.jsx)(z.A,{initialView:"fullDate",formik:eI,name:"endDate",placeholder:"Select date"})]})]})]}),"achievement"===eS&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Title*"}),(0,a.jsx)("input",{type:"text",value:eP.title||"",onChange:e=>eR({...eP,title:e.target.value}),className:"w-full border rounded-lg px-3 py-2.5 text-sm bg-gray-50 outline-none focus:ring-2 focus:ring-blue-500"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Organization"}),(0,a.jsx)("input",{type:"text",value:eP.organization||"",onChange:e=>eR({...eP,organization:e.target.value}),className:"w-full border rounded-lg px-3 py-2.5 text-sm bg-gray-50 outline-none focus:ring-2 focus:ring-blue-500"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Description"}),(0,a.jsx)("textarea",{value:eP.description||"",onChange:e=>eR({...eP,description:e.target.value}),rows:4,className:"w-full border rounded-lg px-3 py-2 text-sm bg-gray-50 outline-no
1ne focus:ring-2 focus:ring-blue-500 resize-none"})]})]})]}),(0,a.jsxs)("div",{className:"flex justify-end gap-3 mt-6",children:[(0,a.jsx)("button",{onClick:()=>eC(!1),className:"px-4 py-2 text-sm text-red-500 hover:bg-red-50 rounded-lg font-medium",children:"CANCEL"}),(0,a.jsx)("button",{onClick:eT,disabled:eF,className:"px-5 py-2 text-sm text-blue-600 hover:bg-blue-50 rounded-lg font-medium disabled:opacity-50",children:eF?"SAVING...":"education"===eS?"DONE":"SAVE"})]})]})}),ey&&(0,a.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/40",children:(0,a.jsxs)("div",{className:"bg-white rounded-xl shadow-xl w-full max-w-md mx-4 p-6",children:[(0,a.jsx)("h2",{className:"text-lg font-semibold text-gray-800 mb-4",children:"Reject Developer"}),(0,a.jsx)("textarea",{value:eg,onChange:e=>ev(e.target.value),placeholder:"Reason for rejection...",className:"w-full border rounded-lg px-3 py-2 text-sm outline-none focus:ring-2 focus:ring-blue-500 resize-none",rows:4}),(0,a.jsxs)("div",{className:"flex justify-end gap-3 mt-4",children:[(0,a.jsx)("button",{onClick:()=>eb(!1),className:"px-4 py-2 text-sm text-gray-600 hover:bg-gray-100 rounded-lg",children:"Cancel"}),(0,a.jsx)("button",{onClick:()=>ez("rejected",eg),disabled:eh||!eg.trim(),className:"bg-red-600 text-white px-4 py-2 rounded-lg text-sm font-medium hover:bg-red-700 disabled:opacity-50",children:eh?"Rejecting...":"Reject"})]})]})})]})};var U=s(4853);let q=()=>(0,a.jsxs)(l.A,{hideSidebar:!1,children:[(0,a.jsx)(U.bV,{title:"Developer Details",description:"Detailed developer profile view for admin review."}),(0,a.jsx)("div",{className:"flex-1 min-w-0 overflow-auto p-6",children:(0,a.jsx)(W,{})})]})}},e=>{var t=t=>e(e.s=t);e.O(0,[3197,1106,399,8419,6902,607,2093,719,4976,9993,4642,4117,3282,636,6593,8792],()=>t(77068)),_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.