1import{u as f,r as w,j as t,b as y}from"./app-C4JvTZ4X.js";import{C as x}from"./CheckboxCardOption-BQD7ekoN.js";import{R as b,F as v}from"./FilterSheet-_iimuXv4.js";import{F as p}from"./FormLabel-ew1pXad_.js";import{C as F}from"./ComboboxSelect-tRd0ZOLz.js";import{u as S}from"./use-translation-DHeTNDjg.js";import{C as _}from"./circle-check-big-CWd3UmC5.js";import{T as P}from"./trash-2-Ck_sCjel.js";/* empty css */import"./utils-D-_GmQbo.js";import"./index-BzwBo55Z.js";import"./index-BnEBJ9Wz.js";import"./index-CncQ0HDQ.js";import"./index-ZA8bFkQr.js";import"./index-Brt361Md.js";import"./index-Bt7T2i2Y.js";import"./index-1Iy5L9JG.js";import"./index-gurXTEHv.js";import"./index-BUMI5Alo.js";import"./index-BCqfIV5N.js";import"./circle-check-BY8Z5FUT.js";import"./createLucideIcon-CG5pTxDe.js";import"./TooltipButton-tq94Z8F0.js";import"./tooltip-CfAoH_lu.js";import"./index-D3-XjAM9.js";import"./index-C1Q1gb3i.js";import"./index-DKCyn46H.js";import"./index-C2zllJwD.js";import"./index-DVpavd6F.js";import"./index-DelJNRNC.js";import"./button-DwBH6lL2.js";import"./index-DS3HsZ3l.js";import"./sheet-C71cKAy0.js";import"./index-CU5i4-2y.js";import"./index-C7FVmubS.js";import"./x-7V8JLukm.js";import"./sliders-horizontal-KKIrFZ1C.js";import"./label-BVf5Wk56.js";import"./index-ByS91XrP.js";import"./popover-Dycol_gf.js";import"./search-BjuOUtZ8.js";import"./chevrons-up-down-BPnwhvhm.js";import"./check-CLB_KT4s.js";const ge=()=>{const c=typeof window<"u"?window.location.pathname:"",{parents:n}=f().props,l=typeof window<"u"?new URLSearchParams(window.location.search):new URLSearchParams,[o,d]=w.useState({category_code:l.get("category_code")||"",trashed:l.get("trashed")||""}),i=e=>{const r={...o,...e};d(r),m(r)},m=e=>{if(!c)return;const r=e??o,a=new URLSearchParams(window.location.search);r.category_code?a.set("category_code",r.category_code):a.delete("category_code"),r.trashed?a.set("trashed",r.trashed):a.delete("trashed"),a.set("page","1"),y.get(`${c}?${a.toString()}`,{},{preserveState:!0,preserveScroll:!0})},h=()=>i({category_code:"",trashed:""}),{t:s,currentLocale:u}=S(),g=[{value:"",label:s("Without Trashed"),icon:_},{value:"with",label:s("With Trashed"),icon:b},{value:"only",label:s("Only Trashed"),icon:P}];return t.jsxs(v,{handleFilter:m,resetFilter:h,isFiltered:!!o.category_code||!!o.trashed,children:[t.jsxs("div",{className:"mb-4",children:[t.jsx(p,{label:"Parent"}),t.jsx(F,{options:[{value:"",label:s("All")},...n.map(e=>({value:e.code?.toString(),label:`(${e.order_index}) ${u==="kh"&&e.name_kh||e.name}`}))],value:o.category_code,onChange:e=>i({category_code:e}),placeholder:"Select Parent...",searchPlaceholder:"Search Parent...",className:"mt-1"})]}),t.jsxs("div",{className:"mb-4",children:[t.jsx(p,{label:"Trashed"}),t.jsx("div",{className:"mt-1 grid w-full max-w-sm grid-cols-3 gap-3",children:g.map(e=>t.jsx(x,{option:e,checked:o.trashed===e.value,onChange:r=>i({trashed:r})},e.value))})]})]})};export{ge as default};
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.