import{u as L,r as C,j as s,f as z,bf as P,ao as k,e as y}from"./vendor-BKmmeuxg.js";import{B as a}from"./button-BpNwv2aE.js";import{C as B}from"./card-D9_SJYq6.js";import{S as D}from"./scroll-area-C8HGru-R.js";import{S as E,a as F,b as O}from"./sheet-DSvHVmaW.js";import{T as p,a as x,b as u,c as h}from"./tooltip-BsX7Z6vz.js";import{u as Q}from"./use-screen-DU5n3V8C.js";import{L as R}from"./landing-layout-DQFYAk24.js";import{g as _}from"./route-B4ZMN77y.js";import j from"./course-filter-C7q4JNIc.js";import"./index-WW_1X1qx.js";import"./utils-DxSsnXxD.js";import"./index-CupQom6K.js";import"./app-logo-CmnEIwal.js";import"./main-_V386djS.js";import"./index-D9-QKOod.js";import"./dropdown-menu-DO-po5c1.js";import"./use-auth-NG-DQJrC.js";import"./appearance-D2z3xcjR.js";import"./app-BytVvUs_.js";/* empty css            */import"./language-BFZ7KItL.js";import"./separator-_3LZ_wAA.js";import"./notification-CYMPYbAP.js";import"./popover-B4kBsMuI.js";import"./profile-toggle-CvHrFE0q.js";import"./avatar-j28afJTV.js";import"./index.browser-OxPLOBIU.js";import"./search-input-D2aHQefO.js";import"./debounce-CWHP_ANh.js";import"./radio-group-C0C2vfl-.js";const js=({children:f})=>{const{url:g,props:v}=L(),{category:e,categoryChild:r,translate:N}=v,{frontend:i}=N,[w,l]=C.useState(!1),n=_(g),c=n.view??"grid",{screen:m}=Q(),b=(t,S,T)=>{const o={...n};return"search"in o&&delete o.search,route("category.courses",{category:S,category_child:T,...o,...t})},d=t=>{y.get(b({view:t},(e==null?void 0:e.slug)||"all",r==null?void 0:r.slug))};return s.jsx(R,{customizable:!1,children:s.jsxs("div",{className:"container flex items-start gap-6 py-6",children:[m>768&&s.jsx(B,{className:"sticky top-24 w-64 p-4",children:s.jsx(j,{})}),s.jsxs("div",{className:"flex-1",children:[s.jsxs("div",{className:"mb-6 flex items-center justify-between",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[m<768&&s.jsxs(E,{open:w,onOpenChange:l,children:[s.jsx(F,{asChild:!0,children:s.jsx(a,{size:"icon",variant:"outline",children:s.jsx(z,{className:"h-5 w-5"})})}),s.jsx(O,{side:"left",className:"border-border w-[220px]",children:s.jsx(D,{className:"h-full",children:s.jsx(j,{setOpen:l})})})]}),s.jsxs("div",{children:[s.jsxs("h2",{className:"text-2xl font-bold capitalize",children:[e||r?(e==null?void 0:e.title)||(r==null?void 0:r.title):i.all," ",i.courses]}),(e&&e.description||r&&r.description)&&s.jsx("p",{className:"text-muted-foreground mt-1 text-sm",children:(e==null?void 0:e.description)||(r==null?void 0:r.description)})]})]}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx(p,{delayDuration:0,children:s.jsxs(x,{children:[s.jsx(u,{asChild:!0,children:s.jsx(a,{size:"icon",variant:c==="grid"?"default":"outline",onClick:()=>d("grid"),children:s.jsx(P,{className:"h-4 w-4"})})}),s.jsx(h,{children:s.jsx("p",{children:i.grid_view})})]})}),s.jsx(p,{delayDuration:0,children:s.jsxs(x,{children:[s.jsx(u,{asChild:!0,children:s.jsx(a,{size:"icon",variant:c==="list"?"default":"outline",onClick:()=>d("list"),children:s.jsx(k,{className:"h-4 w-4"})})}),s.jsx(h,{children:s.jsx("p",{children:i.list_view})})]})})]})]}),f]})]})})};export{js as default};
