import{j as e}from"./sikshya-admin-sikshya-react-E_TY_un4.js";import{ad as s,ae as p}from"./sikshya-admin-sikshya-vendor-BVAk_Gwu.js";function m({disabled:d,selectedCount:t,value:r,onChange:h,onApply:c,applyBusy:i=!1,trashMode:b,customOptions:l,selectId:o="sikshya-bulk"}){const n=d||i,u=!n&&t>0&&r!=="",x=Array.isArray(l)&&l.length>0;return e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx("label",{htmlFor:o,className:"sr-only",children:s("Bulk actions","sikshya")}),e.jsxs("select",{id:o,disabled:n,value:r,onChange:a=>h(a.target.value),className:"rounded-xl border border-slate-200 bg-white px-3 py-2 text-sm text-slate-800 shadow-sm focus:border-brand-500 focus:outline-none focus:ring-2 focus:ring-brand-500/20 disabled:cursor-not-allowed disabled:bg-slate-50 disabled:text-slate-400 dark:border-slate-600 dark:bg-slate-800 dark:text-slate-100 dark:disabled:bg-slate-800/50",children:[e.jsx("option",{value:"",children:s("Bulk actions","sikshya")}),x?l.map(a=>e.jsx("option",{value:a.value,children:a.label},a.value)):b?e.jsxs(e.Fragment,{children:[e.jsx("option",{value:"restore_draft",children:s("Restore to draft","sikshya")}),e.jsx("option",{value:"delete_permanent",children:s("Delete permanently","sikshya")})]}):e.jsxs(e.Fragment,{children:[e.jsx("option",{value:"move_trash",children:s("Move to trash","sikshya")}),e.jsx("option",{value:"publish",children:s("Publish","sikshya")}),e.jsx("option",{value:"draft",children:s("Move to draft","sikshya")}),e.jsx("option",{value:"pending",children:s("Mark pending review","sikshya")}),e.jsx("option",{value:"private",children:s("Move to private","sikshya")})]})]}),e.jsx("button",{type:"button",disabled:!u,onClick:c,className:"rounded-lg border border-slate-200 bg-white px-3 py-2 text-sm font-medium text-slate-800 shadow-sm transition hover:bg-slate-50 focus:outline-none focus-visible:ring-2 focus-visible:ring-brand-500/40 focus-visible:ring-offset-1 disabled:cursor-not-allowed disabled:opacity-50 dark:border-slate-600 dark:bg-slate-800 dark:text-slate-100 dark:hover:bg-slate-700 dark:focus-visible:ring-offset-slate-900",children:i?s("Applying…","sikshya"):s("Apply","sikshya")}),t>0?e.jsx("span",{className:"text-xs font-medium text-slate-500 dark:text-slate-400",children:p(s("%d selected","sikshya"),t)}):null]})}export{m as B};
