import{r as t,X as w,j as s,x as r,A as N}from"./app-Dqm4owHT.js";import{c as y}from"./index-Ebf2_-ZL.js";import{L as x,S as v,C as b,a as C,b as k,c as M,d as m,M as S,B as D,D as z,e as L,f as A,g as O,h as T,i as B,j as _}from"./dropdown-menu-BCRVGgoO.js";import{B as e}from"./button-B8ZzRKBh.js";import{t as f,T as E}from"./toaster-D9vdlzAC.js";import{X as P}from"./x-DjRPG20W.js";import{G as $}from"./graduation-cap-CAt1NeIc.js";import{C as q}from"./chevron-right-Da1NFNyx.js";import{c as l}from"./createLucideIcon-Cc-ke-6N.js";import{B as X}from"./book-open-CnqYiosu.js";import{C as G}from"./calendar-JORKyFFv.js";import{A as I}from"./award-DnfS0Cbz.js";import{a as R}from"./Combination-DterT_Fn.js";/**
* @license lucide-react v0.474.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const U=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}],["path",{d:"M7 20.662V19a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v1.662",key:"154egf"}]],V=l("CircleUser",U);/**
* @license lucide-react v0.474.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const H=[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}],["path",{d:"M12 11h4",key:"1jrz19"}],["path",{d:"M12 16h4",key:"n85exb"}],["path",{d:"M8 11h.01",key:"1dfujw"}],["path",{d:"M8 16h.01",key:"18s6g9"}]],J=l("ClipboardList",H);/**
* @license lucide-react v0.474.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Q=[["path",{d:"m13 13.5 2-2.5-2-2.5",key:"1rvxrh"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}],["path",{d:"M9 8.5 7 11l2 2.5",key:"6ffwbx"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],F=l("SearchCode",Q);function xs({user:j,header:K,children:p}){const[W,Y]=t.useState(!1),[n,i]=t.useState(!1),[o,u]=t.useState({training:!1,certificates:!1,profile:!1}),a=w().props.flash;t.useEffect(()=>{a&&a.success&&f({title:"Success",description:a.success}),a&&a.error&&f({variant:"destructive",title:"Error",description:a.error})},[a]);const c=()=>{N.post("/logout")},g=h=>{u(d=>({...d,[h]:!d[h]}))};return s.jsxs("div",{className:"min-h-screen bg-gray-50/95",children:[n&&s.jsx("div",{className:"fixed inset-0 bg-black/50 z-40 lg:hidden",onClick:()=>i(!1)}),s.jsxs("aside",{className:`
fixed left-0 top-0 h-full bg-white border-r shadow-sm z-50
w-[280px] lg:w-64
transition-transform duration-200
${n?"translate-x-0":"-translate-x-full lg:translate-x-0"}
`,children:[s.jsxs("div",{className:"flex items-center justify-between p-6 border-b",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(x,{className:"w-6 h-6 text-blue-600"}),s.jsx("span",{className:"font-semibold text-lg",children:"Talent Peserta"})]}),s.jsx(e,{variant:"ghost",size:"icon",className:"lg:hidden",onClick:()=>i(!1),children:s.jsx(P,{className:"w-5 h-5"})})]}),s.jsx(v,{className:"h-[calc(100vh-5rem)]",children:s.jsxs("nav",{className:"p-4 space-y-2",children:[s.jsx(r,{href:route("dashboard"),children:s.jsxs(e,{variant:"ghost",className:"w-full justify-start gap-2",children:[s.jsx(x,{className:"w-5 h-5"})," Dashboard"]})}),s.jsxs(b,{open:o.training,onOpenChange:()=>g("training"),children:[s.jsx(C,{asChild:!0,children:s.jsxs(e,{variant:"ghost",className:"w-full justify-between",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx($,{className:"w-5 h-5"}),s.jsx("span",{children:"Pelatihan"})]}),s.jsx(q,{className:y("w-4 h-4 transition-transform",o.training&&"rotate-90")})]})}),s.jsxs(k,{className:"pl-6 space-y-1",children:[s.jsx(r,{href:route("course.index"),children:s.jsxs(e,{variant:"ghost",size:"sm",className:"w-full justify-start gap-2",children:[s.jsx(F,{className:"w-4 h-4"})," Cari"]})}),s.jsx(r,{href:route("pelatihan.index"),children:s.jsxs(e,{variant:"ghost",size:"sm",className:"w-full justify-start gap-2",children:[s.jsx(X,{className:"w-4 h-4"})," Terdaftar"]})}),s.jsx(r,{href:route("jadwal.index"),children:s.jsxs(e,{variant:"ghost",size:"sm",className:"w-full justify-start gap-2",children:[s.jsx(G,{className:"w-4 h-4"})," Jadwal"]})}),s.jsx(r,{href:route("tugas.index"),children:s.jsxs(e,{variant:"ghost",size:"sm",className:"w-full justify-start gap-2",children:[s.jsx(J,{className:"w-4 h-4"})," Tugas"]})})]})]}),s.jsx(r,{href:route("sertifikat.index"),children:s.jsxs(e,{variant:"ghost",className:"w-full justify-start gap-2",children:[s.jsx(I,{className:"w-5 h-5"})," Sertifikat"]})}),s.jsx(r,{href:route("profile.edit"),children:s.jsxs(e,{variant:"ghost",className:"w-full justify-start gap-2",children:[s.jsx(V,{className:"w-5 h-5"})," Profil"]})}),s.jsx(M,{}),s.jsxs(e,{onClick:c,variant:"ghost",className:"w-full justify-start gap-2 text-red-600 hover:text-red-700 hover:bg-red-50",children:[s.jsx(m,{className:"w-5 h-5"})," Log out"]})]})})]}),s.jsxs("main",{className:"lg:ml-64 p-4 lg:p-8",children:[s.jsxs("header",{className:"flex flex-row justify-end mb:justify-start items-start sm:items-center gap-4 mb-4",children:[s.jsx("div",{className:"flex items-center gap-4 lg:hidden",children:s.jsx(e,{variant:"outline",size:"icon",onClick:()=>i(!0),children:s.jsx(S,{className:"w-5 h-5"})})}),s.jsxs("div",{className:"flex items-center gap-4 w-full justify-end",children:[s.jsx(e,{variant:"ghost",size:"icon",children:s.jsx(D,{className:"w-5 h-5"})}),s.jsxs(z,{children:[s.jsx(L,{asChild:!0,children:s.jsxs(e,{variant:"outline",className:"gap-2",children:[s.jsx("img",{src:route("my-avatar"),alt:"Profile",className:"w-6 h-6 rounded-full"}),s.jsx("span",{className:"hidden sm:inline",children:j.nama}),s.jsx(R,{className:"w-4 h-4"})]})}),s.jsxs(A,{className:"w-56",children:[s.jsx(O,{children:"My Account"}),s.jsx(T,{}),s.jsxs(B,{onClick:c,children:[s.jsx(m,{}),s.jsx("span",{children:"Log out"}),s.jsx(_,{children:"⇧⌘Q"})]})]})]})]})]}),p,s.jsx(E,{})]})]})}export{xs as A};
Anons79 File Manager Version 1.0, Coded By Anons79
Email: [email protected]