var k=Object.defineProperty;var f=Object.getOwnPropertySymbols;var _=Object.prototype.hasOwnProperty,y=Object.prototype.propertyIsEnumerable;var g=(a,e,i)=>e in a?k(a,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):a[e]=i,n=(a,e)=>{for(var i in e||(e={}))_.call(e,i)&&g(a,i,e[i]);if(f)for(var i of f(e))y.call(e,i)&&g(a,i,e[i]);return a};import{aT as B,r as D,j as s,aY as E,cH as F,bn as H,aX as O}from"./react-vendor-xYZnmIII.js";import{a as Q,S as R,b as A,B as d,d as G,e as X,_ as v,a7 as N,a8 as w,a9 as b}from"./ui-components-CQM92IK3.js";import{u as Y}from"./use-screen-XQDPI5EM.js";import{L as q}from"./landing-layout-hWcnW4wD.js";import{g as I}from"./route-D0xh7FtZ.js";import T from"./course-filter-C8qgPusF.js";import"./inertia-vendor-cBbDTmhJ.js";import"./ui-vendor-Ds9iwIxa.js";import"./interactive-vendor-B1OgcAgP.js";import"./index-J6afNYNJ.js";import"./app-logo-BQGZ7CFC.js";import"./main-CnGu8e_N.js";import"./theme-colors-CLpwvDr4.js";import"./use-auth-l-ShkEGs.js";import"./appearance-5ivIjthu.js";import"./language-C7bQIqs2.js";import"./notification-C3MPMjX2.js";import"./profile-toggle-CTDQohVW.js";import"./index.browser-OxPLOBIU.js";import"./search-input-BXgStIKS.js";import"./debounce-CWHP_ANh.js";const us=({children:a})=>{var j;const{url:e,props:i}=B(),{category:r,categoryChild:t,translate:L}=i,{frontend:l}=L,[S,m]=D.useState(!1),p=I(e),x=(j=p.view)!=null?j:"grid",{screen:u}=Y(),z=(o,C,P)=>{const c=n({},p);return"search"in c&&delete c.search,route("category.courses",n(n({category:C,category_child:P},c),o))},h=o=>{O.get(z({view:o},(r==null?void 0:r.slug)||"all",t==null?void 0:t.slug))};return s.jsx(q,{customizable:!1,children:s.jsxs("div",{className:"container flex items-start gap-6 py-6",children:[u>768&&s.jsx(Q,{className:"sticky top-24 w-64 p-4",children:s.jsx(T,{})}),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:[u<768&&s.jsxs(R,{open:S,onOpenChange:m,children:[s.jsx(A,{asChild:!0,children:s.jsx(d,{size:"icon",variant:"outline",children:s.jsx(E,{className:"h-5 w-5"})})}),s.jsx(G,{side:"left",className:"border-border w-[220px]",children:s.jsx(X,{className:"h-full",children:s.jsx(T,{setOpen:m})})})]}),s.jsxs("div",{children:[s.jsxs("h2",{className:"text-2xl font-bold capitalize",children:[r||t?(r==null?void 0:r.title)||(t==null?void 0:t.title):l.all," ",l.courses]}),(r&&r.description||t&&t.description)&&s.jsx("p",{className:"text-muted-foreground mt-1 text-sm",children:(r==null?void 0:r.description)||(t==null?void 0:t.description)})]})]}),s.jsxs("div",{className:"flex gap-2",children:[s.jsx(v,{delayDuration:0,children:s.jsxs(N,{children:[s.jsx(w,{asChild:!0,children:s.jsx(d,{size:"icon",variant:x==="grid"?"default":"outline",onClick:()=>h("grid"),children:s.jsx(F,{className:"h-4 w-4"})})}),s.jsx(b,{children:s.jsx("p",{children:l.grid_view})})]})}),s.jsx(v,{delayDuration:0,children:s.jsxs(N,{children:[s.jsx(w,{asChild:!0,children:s.jsx(d,{size:"icon",variant:x==="list"?"default":"outline",onClick:()=>h("list"),children:s.jsx(H,{className:"h-4 w-4"})})}),s.jsx(b,{children:s.jsx("p",{children:l.list_view})})]})})]})]}),a]})]})})};export{us as default};
