import{X as d,r as i,j as e,S as x}from"./app-BS0Mi5CH.js";import{G as h}from"./GuestLayout-DzO7BEXx.js";import{S as u}from"./search-DZq-9XRd.js";import{F as p}from"./filter-BYy4nepu.js";import{S as f}from"./star-CdGQ5i6O.js";import{C as j}from"./clock-D9si86Dr.js";import{U as g}from"./users-C-ocVDlL.js";import{B as v}from"./book-open-C6uPgXGY.js";import{C as N}from"./chevron-right-D6R1xOap.js";import"./toaster-CDoIse9q.js";import"./index-CoFumDt_.js";import"./utils-CytzSlOG.js";import"./index-BQ95NZR7.js";import"./x-CPbCm0DX.js";import"./createLucideIcon-BqjyEKxG.js";function I({pelatihans:t}){d().props.auth.user;const[a,o]=i.useState(""),[r,n]=i.useState("all"),l=t!=null?t==null?void 0:t.filter(s=>{const c=s.title.toLowerCase().includes(a.toLowerCase()),m=r==="all"||s.level.toLowerCase()===r.toLowerCase();return c&&m}):[];return e.jsxs(h,{children:[e.jsx(x,{title:"Cari Pelatihan"}),e.jsxs("main",{className:"max-w-7xl mx-auto px-4 py-8",children:[e.jsxs("div",{className:"flex flex-col md:flex-row gap-4 mb-8",children:[e.jsxs("div",{className:"flex-1 relative",children:[e.jsx(u,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-400 h-5 w-5"}),e.jsx("input",{type:"text",placeholder:"Search courses...",className:"w-full pl-10 pr-4 py-3 rounded-lg border border-gray-200 focus:outline-hidden focus:ring-2 focus:ring-blue-500 focus:border-transparent",value:a,onChange:s=>o(s.target.value)})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(p,{className:"text-gray-500 h-5 w-5"}),e.jsxs("select",{className:"px-4 py-3 rounded-lg border border-gray-200 focus:outline-hidden focus:ring-2 focus:ring-blue-500 focus:border-transparent bg-white",value:r,onChange:s=>n(s.target.value),children:[e.jsx("option",{value:"all",children:"All Levels"}),e.jsx("option",{value:"beginner",children:"Beginner"}),e.jsx("option",{value:"intermediate",children:"Intermediate"}),e.jsx("option",{value:"advanced",children:"Advanced"})]})]})]}),e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:l.map(s=>e.jsxs("div",{className:"bg-white rounded-xl shadow-xs hover:shadow-md transition-shadow duration-300",children:[e.jsx("img",{src:route("course.thumbnail",s.id),alt:s.title,className:"w-full h-48 object-cover rounded-t-xl"}),e.jsxs("div",{className:"p-6",children:[e.jsxs("div",{className:"flex items-start justify-between",children:[e.jsx("h2",{className:"text-xl font-semibold text-gray-900 mb-2",children:s.title}),e.jsxs("span",{className:"flex items-center text-yellow-500",children:[e.jsx(f,{className:"h-4 w-4 fill-current"}),e.jsx("span",{className:"ml-1 text-sm",children:4})]})]}),e.jsxs("p",{className:"text-gray-600 mb-4",children:["by ",s.instructor.nama]}),e.jsxs("div",{className:"flex items-center justify-between text-sm text-gray-500 mb-4",children:[e.jsxs("span",{className:"flex items-center",children:[e.jsx(j,{className:"h-4 w-4 mr-1"}),s.duration]}),e.jsxs("span",{className:"flex items-center",children:[e.jsx(g,{className:"h-4 w-4 mr-1"}),s.pesertas_count.toLocaleString()," students"]}),e.jsxs("span",{className:"flex items-center",children:[e.jsx(v,{className:"h-4 w-4 mr-1"}),s.level]})]}),e.jsxs("a",{href:route("course.show",s.id),className:"w-full flex items-center justify-center px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-colors duration-300",children:["View Course",e.jsx(N,{className:"h-4 w-4 ml-2"})]})]})]},s.id))}),l.length===0&&e.jsx("div",{className:"text-center py-12",children:e.jsx("p",{className:"text-gray-500 text-lg",children:"No courses found matching your criteria."})})]})]})}export{I as default};
Anons79 File Manager Version 1.0, Coded By Anons79
Email: [email protected]