import{u as L,r as C,j as s,f as z,ca as P,ao as k,e as y}from"./vendor-rThclpOQ.js";import{B as a}from"./button-ZcsoqUQn.js";import{C as B}from"./card-HXna_7vU.js";import{S as D}from"./scroll-area-BCwyUKIK.js";import{S as E,a as F,b as O}from"./sheet-BfC102Vr.js";import{T as d,a as x,b as u,c as h}from"./tooltip-WOIaUmuC.js";import{u as Q}from"./use-screen-CKcjNZmA.js";import{L as R}from"./landing-layout-DlxImaTd.js";import{g as _}from"./route-B4ZMN77y.js";import j from"./course-filter-CQdRxhhv.js";import"./index-DquVdLUg.js";import"./utils-8KAaAB9H.js";import"./index-Bu96Y4ST.js";import"./app-logo-Bj2M2lhk.js";import"./main-CC75Iw88.js";import"./sonner-CgbrDmPW.js";import"./index-CWNIUFqh.js";import"./dropdown-menu-Cm0H42C1.js";import"./use-auth-C-KzOAQ_.js";import"./appearance-Bwg83W1G.js";import"./app-BsPpMpSR.js";/* empty css            */import"./language-BmlkXzFK.js";import"./separator-Cir9hccx.js";import"./notification-Bti7isEF.js";import"./popover-otAaS-4X.js";import"./profile-toggle-CNRfQZAT.js";import"./avatar-BsP_s7dr.js";import"./index.browser-OxPLOBIU.js";import"./search-input-CZklQNNU.js";import"./debounce-CWHP_ANh.js";import"./radio-group-ZDy0XuKl.js";const fs=({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})},p=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(d,{delayDuration:0,children:s.jsxs(x,{children:[s.jsx(u,{asChild:!0,children:s.jsx(a,{size:"icon",variant:c==="grid"?"default":"outline",onClick:()=>p("grid"),children:s.jsx(P,{className:"h-4 w-4"})})}),s.jsx(h,{children:s.jsx("p",{children:i.grid_view})})]})}),s.jsx(d,{delayDuration:0,children:s.jsxs(x,{children:[s.jsx(u,{asChild:!0,children:s.jsx(a,{size:"icon",variant:c==="list"?"default":"outline",onClick:()=>p("list"),children:s.jsx(k,{className:"h-4 w-4"})})}),s.jsx(h,{children:s.jsx("p",{children:i.list_view})})]})})]})]}),f]})]})})};export{fs as default};
