1/*! For license information please see 6133.00f84f75.chunk.js.LICENSE.txt */ 2"use strict";(self.webpackChunkfrontend=self.webpackChunkfrontend||[]).push([[6133],{3002(e,s,t){t.d(s,{A:()=>a});const a=(0,t(7784).A)("file",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]])},3204(e,s,t){t.d(s,{A:()=>a});const a=(0,t(7784).A)("hard-drive",[["line",{x1:"22",x2:"2",y1:"12",y2:"12",key:"1y58io"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}],["line",{x1:"6",x2:"6.01",y1:"16",y2:"16",key:"sgf278"}],["line",{x1:"10",x2:"10.01",y1:"16",y2:"16",key:"1l4acy"}]])},5040(e,s,t){t.d(s,{A:()=>a});const a=(0,t(7784).A)("link",[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]])},6133(e,s,t){t.r(s),t.d(s,{ResourcesPage:()=>y,default:()=>v});var a=t(5043),l=t(9970),r=t(8729),c=t(4980),i=t(1140),n=t(3390),d=t(5949),o=t(7819),m=t(764),x=t(1680),h=t(3002),u=t(4965),p=t(3204),j=t(67),N=t(5040),f=t(9333),g=(t(6328),t(579));const y=()=>{const{user:e}=(0,r.As)(),[s,t]=(0,a.useState)(!0),[y,v]=(0,a.useState)({connected:!1,mock:!0}),[A,b]=(0,a.useState)([]),[w,k]=(0,a.useState)({});(0,a.useEffect)(()=>{(async()=>{try{const[e,s,t]=await Promise.all([c.XX.getStatus(),c.XX.getFolders(),c.BP.getAll()]);v(e.data),b(s.data.folders||[]);const a={};t.data.forEach(e=>{a[e.course_id]=e}),k(a)}catch(e){console.error("Failed to load resources:",e)}finally{t(!1)}})()},[e.user_id]);const D=[{id:1,name:"Dental Implants - Module 1 Materials",type:"folder",items:12,course:"Dental Implants Masterclass"},{id:2,name:"Case Study Templates",type:"folder",items:8,course:"Elite Leadership Program"},{id:3,name:"Surgical Protocols Guide.pdf",type:"pdf",size:"2.4 MB",course:"Dental Implants Masterclass"},{id:4,name:"Patient Communication Workshop.mp4",type:"video",duration:"45 min",course:"Practice Growth Blueprint"}],M=e=>{switch(e){case"folder":return(0,g.jsx)(u.A,{className:"w-6 h-6 text-[#41EAD4]"});case"pdf":return(0,g.jsx)(x.A,{className:"w-6 h-6 text-red-500"});case"video":return(0,g.jsx)(f.A,{className:"w-6 h-6 text-purple-500"});case"image":return(0,g.jsx)(j.A,{className:"w-6 h-6 text-blue-500"});default:return(0,g.jsx)(h.A,{className:"w-6 h-6 text-slate-500"})}};return s?(0,g.jsx)(l.NI,{children:(0,g.jsx)("div",{className:"flex items-center justify-center h-64",children:(0,g.jsxs)("div",{className:"animate-pulse flex flex-col items-center gap-4",children:[(0,g.jsx)("div",{className:"w-12 h-12 bg-slate-200 rounded-xl"}),(0,g.jsx)("div",{className:"h-4 w-32 bg-slate-200 rounded"})]})})}):(0,g.jsx)(l.NI,{children:(0,g.jsxs)("div",{className:"space-y-8","data-testid":"resources-page",children:[(0,g.jsxs)("div",{className:"flex flex-col md:flex-row md:items-center justify-between gap-4",children:[(0,g.jsxs)("div",{children:[(0,g.jsx)("h1",{className:"text-2xl font-bold text-[#0D1B2A] mb-2",children:"Resources"}),(0,g.jsx)("p",{className:"text-slate-500",children:"Access course materials and shared resources"})]}),(0,g.jsx)("div",{className:"flex items-center gap-2",children:(0,g.jsxs)("div",{className:"flex items-center gap-2 px-4 py-2 rounded-full ".concat(y.connected?"bg-emerald-100 text-emerald-700":"bg-amber-100 text-amber-700"),children:[(0,g.jsx)(p.A,{className:"w-4 h-4"}),(0,g.jsx)("span",{className:"text-sm font-medium",children:y.connected?"Drive Connected":"Drive Not Connected"}),y.mock&&(0,g.jsx)(d.E,{variant:"outline",className:"text-xs",children:"Mock"})]})})]}),y.mock&&(0,g.jsx)(i.Zp,{className:"border-amber-200 bg-amber-50",children:(0,g.jsx)(i.Wu,{className:"py-4",children:(0,g.jsxs)("div",{className:"flex items-start gap-3",children:[(0,g.jsx)(o.A,{className:"w-5 h-5 text-amber-600 mt-0.5"}),(0,g.jsxs)("div",{children:[(0,g.jsx)("p",{className:"font-medium text-amber-800",children:"Google Drive Integration (Demo Mode)"}),(0,g.jsx)("p",{className:"text-sm text-amber-700 mt-1",children:"Google Drive integration is currently in demo mode. Connect your Google account to access your course resources."}),(0,g.jsxs)(n.$,{variant:"outline",size:"sm",className:"mt-3 border-amber-600 text-amber-700 hover:bg-amber-100",children:[(0,g.jsx)(N.A,{className:"w-4 h-4 mr-2"}),"Connect Google Drive"]})]})]})})}),A.length>0&&(0,g.jsxs)("div",{className:"space-y-4",children:[(0,g.jsxs)("h2",{className:"text-lg font-semibold text-[#0D1B2A] flex items-center gap-2",children:[(0,g.jsx)(u.A,{className:"w-5 h-5 text-[#41EAD4]"}),"Course Resources"]}),(0,g.jsx)("div",{className:"grid md:grid-cols-2 lg:grid-cols-3 gap-4",children:A.map(e=>{const s=w[e.course_id];return(0,g.jsx)(i.Zp,{className:"border-slate-100 hover:shadow-md transition-all duration-300 hover:-translate-y-1 cursor-pointer group",children:(0,g.jsx)(i.Wu,{className:"p-6",children:(0,g.jsxs)("div",{className:"flex items-start gap-4",children:[(0,g.jsx)("div",{className:"w-12 h-12 bg-[#0D1B2A] rounded-xl flex items-center justify-center group-hover:bg-[#1B3A4B] transition-colors",children:(0,g.jsx)(u.A,{className:"w-6 h-6 text-[#41EAD4]"})}),(0,g.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,g.jsx)("h3",{className:"font-semibold text-[#0D1B2A] truncate",children:e.name}),(0,g.jsx)("p",{className:"text-sm text-slate-500",children:null===s||void 0===s?void 0:s.title})]}),(0,g.jsx)(m.A,{className:"w-5 h-5 text-slate-400 group-hover:text-[#41EAD4] transition-colors"})]})})},e.folder_id)})})]}),(0,g.jsxs)("div",{className:"space-y-4",children:[(0,g.jsxs)("h2",{className:"text-lg font-semibold text-[#0D1B2A] flex items-center gap-2",children:[(0,g.jsx)(x.A,{className:"w-5 h-5 text-[#D4AF37]"}),"All Resources",(0,g.jsx)(d.E,{variant:"outline",className:"ml-2 text-xs",children:"Demo"})]}),(0,g.jsx)(i.Zp,{className:"border-slate-100",children:(0,g.jsx)(i.Wu,{className:"p-0",children:(0,g.jsx)("div",{className:"divide-y divide-slate-100",children:D.map(e=>(0,g.jsxs)("div",{className:"flex items-center gap-4 p-4 hover:bg-slate-50 transition-colors cursor-pointer group",children:[(0,g.jsx)("div",{className:"w-10 h-10 bg-slate-100 rounded-lg flex items-center justify-center",children:M(e.type)}),(0,g.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,g.jsx)("h3",{className:"font-medium text-[#0D1B2A] truncate",children:e.name}),(0,g.jsx)("p",{className:"text-sm text-slate-500",children:e.course})]}),(0,g.jsxs)("div",{className:"text-sm text-slate-400",children:[e.items&&"".concat(e.items," items"),e.size&&e.size,e.duration&&e.duration]}),(0,g.jsx)(m.A,{className:"w-5 h-5 text-slate-400 group-hover:text-[#41EAD4] transition-colors"})]},e.id))})})})]}),0===A.length&&0===D.length&&(0,g.jsx)(i.Zp,{className:"border-slate-100",children:(0,g.jsxs)(i.Wu,{className:"py-12 text-center",children:[(0,g.jsx)(u.A,{className:"w-12 h-12 text-slate-300 mx-auto mb-4"}),(0,g.jsx)("p",{className:"text-slate-500",children:"No resources available yet."}),(0,g.jsx)("p",{className:"text-slate-400 text-sm mt-2",children:"Resources will appear here once you're enrolled in a course."})]})})]})})},v=y},7819(e,s,t){t.d(s,{A:()=>a});const a=(0,t(7784).A)("circle-alert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]])}}]); 3//# sourceMappingURL=6133.00f84f75.chunk.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.