import{t as e}from"./jsx-runtime-wTfS3W87.js";var t=e(),n=[{role:`jobseeker`,label:`求职者`},{role:`recruiter`,label:`招聘者`}];function r({value:e,onChange:r,disabled:i=!1,ariaLabel:a=`选择账号身份`,onRoleFocus:o,onRoleBlur:s}){return(0,t.jsxs)(`div`,{role:`radiogroup`,"aria-label":a,className:`relative grid grid-cols-2 gap-1 rounded-ds-pill p-1`,style:{border:`1px solid var(--ds-border-default)`,background:`var(--ds-bg-subtle)`},children:[(0,t.jsx)(`span`,{"aria-hidden":`true`,className:`absolute bottom-1 top-1 w-[calc(50%-4px)] rounded-ds-pill transition-transform`,style:{left:4,transform:e===`recruiter`?`translateX(100%)`:`translateX(0)`,background:`var(--ds-bg-surface-raised)`,boxShadow:`var(--ds-shadow-sm)`}}),n.map(n=>{let a=e===n.role;return(0,t.jsx)(`button`,{type:`button`,role:`radio`,"aria-checked":a,"aria-label":n.label,disabled:i,onClick:()=>{a||r(n.role)},onFocus:o,onBlur:s,className:[`relative z-[1] min-w-0 rounded-ds-pill px-3 py-2 text-center transition-colors ds-focus-ring`,`min-h-[40px]`,i?`cursor-not-allowed opacity-60`:a?`cursor-default`:`cursor-pointer`].join(` `),style:{border:`0`,background:`transparent`,color:a?`var(--ds-brand)`:`var(--ds-text-secondary)`},children:(0,t.jsx)(`span`,{className:`flex min-w-0 items-center justify-center text-[12px] font-semibold leading-tight`,children:(0,t.jsx)(`span`,{className:`truncate`,children:n.label})})},n.role)})]})}export{r as t};