import{j as e}from"./sikshya-admin-sikshya-react-E_TY_un4.js";import{N as r}from"./sikshya-admin.js";import{ad as a}from"./sikshya-admin-sikshya-vendor-BVAk_Gwu.js";const o="rounded-xl border border-slate-200 bg-white px-3 py-2 text-sm font-medium text-slate-700 shadow-sm focus:border-brand-500 focus:outline-none focus:ring-2 focus:ring-brand-500/20 dark:border-slate-600 dark:bg-slate-800 dark:text-slate-200";function h({searchValue:n,onSearchChange:i,searchPlaceholder:c,searchDisabled:d=!1,sortField:x,sortFieldOptions:u,onSortFieldChange:m,sortOrder:l,onSortOrderToggle:p,trailing:t}){return e.jsxs("div",{className:"flex flex-col gap-3 border-b border-slate-100 p-4 dark:border-slate-800 lg:flex-row lg:flex-wrap lg:items-center lg:gap-x-4 lg:gap-y-3",children:[e.jsxs("div",{className:"relative min-w-0 flex-1 lg:min-w-[12rem]",children:[e.jsx("span",{className:"pointer-events-none absolute left-3 top-1/2 -translate-y-1/2 text-slate-400",children:e.jsx(r,{name:"search",className:"h-4 w-4"})}),e.jsx("input",{type:"search",value:n,onChange:s=>i(s.target.value),placeholder:c,disabled:d,className:"w-full rounded-xl border border-slate-200 bg-slate-50/80 py-2.5 pl-10 pr-3 text-sm text-slate-900 placeholder:text-slate-400 focus:border-brand-500 focus:bg-white focus:outline-none focus:ring-2 focus:ring-brand-500/20 disabled:cursor-not-allowed disabled:opacity-50 dark:border-slate-600 dark:bg-slate-800/80 dark:text-white dark:placeholder:text-slate-500 dark:focus:bg-slate-800",autoComplete:"off"})]}),e.jsxs("div",{className:"flex w-full flex-wrap items-center gap-2 lg:ml-auto lg:w-auto lg:flex-nowrap lg:justify-end",children:[e.jsx("label",{className:"sr-only",htmlFor:"sikshya-list-sort-by",children:a("Sort by","sikshya")}),e.jsx("select",{id:"sikshya-list-sort-by",value:x,onChange:s=>m(s.target.value),className:o,children:u.map(s=>e.jsx("option",{value:s.value,children:s.label},s.value))}),e.jsxs("button",{type:"button",onClick:p,className:`${o} inline-flex items-center gap-1.5`,title:l==="asc"?a("Ascending","sikshya"):a("Descending","sikshya"),children:[l==="asc"?a("Asc","sikshya"):a("Desc","sikshya"),e.jsx(r,{name:"chevronDown",className:"h-3.5 w-3.5 opacity-60"})]}),t?e.jsx("div",{className:"flex w-full flex-wrap items-center gap-2 lg:w-auto lg:flex-nowrap",children:t}):null]})]})}export{h as L};
