@igamingcareer/igaming-components 1.0.90 → 1.0.91

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/Readme.md CHANGED
@@ -248,6 +248,95 @@ export function CompanyAdminExample({ company }: { company: Company }) {
248
248
  - **Save button disabled:** verify `isSaving` is `false` and `canEdit` is `true`.
249
249
  - **Updates not persisting:** confirm your parent handler merges the payload back into company state.
250
250
 
251
+ ## Dashboard tab routing events
252
+
253
+ The Dashboard component can emit a routing-friendly event whenever a tab is selected. Use it to keep your app router in sync (for example, pushing routes in Next.js). You can also pass an `activeTab` prop to control the active tab from outside, along with a `tabPaths` map so your app remains the source of truth for URL formats.
254
+
255
+ ```tsx
256
+ import { useState } from "react";
257
+ import {
258
+ Dashboard,
259
+ type DashboardTab,
260
+ type DashboardTabChangeEvent,
261
+ } from "@igamingcareer/igaming-components";
262
+
263
+ export function DashboardWithRouter({ data }: { data: DashboardData }) {
264
+ const [activeTab, setActiveTab] = useState<DashboardTab>("overview");
265
+
266
+ const handleTabChange = (event: DashboardTabChangeEvent) => {
267
+ setActiveTab(event.tab);
268
+ // Example: Next.js router
269
+ // router.push(event.path ?? "/dashboard");
270
+ };
271
+
272
+ return (
273
+ <Dashboard
274
+ user={data.user}
275
+ profileData={data.profile}
276
+ alerts={data.alerts}
277
+ snapshot={data.snapshot}
278
+ feedItems={data.feedItems}
279
+ onUpdateProfile={data.onUpdateProfile}
280
+ activeTab={activeTab}
281
+ tabPaths={{
282
+ overview: "/dashboard",
283
+ profile: "/dashboard/profile",
284
+ jobs: "/dashboard/jobs",
285
+ courses: "/dashboard/courses",
286
+ news: "/dashboard/news",
287
+ settings: "/dashboard/settings",
288
+ }}
289
+ onTabChange={handleTabChange}
290
+ />
291
+ );
292
+ }
293
+ ```
294
+
295
+ ## Company detail tab routing events
296
+
297
+ The CompanyDetail component can emit a routing-friendly event whenever a tab is selected, so your Next.js app remains the source of truth for URLs. Provide `activeTab`, `tabPaths`, and `onTabChange` to keep routing and UI in sync.
298
+
299
+ ```tsx
300
+ import { useState } from "react";
301
+ import {
302
+ CompanyDetail,
303
+ type CompanyDetailTab,
304
+ type CompanyDetailTabChangeEvent,
305
+ } from "@igamingcareer/igaming-components";
306
+
307
+ export function CompanyDetailWithRouter({ data }: { data: CompanyDetailData }) {
308
+ const [activeTab, setActiveTab] = useState<CompanyDetailTab>("overview");
309
+
310
+ const handleTabChange = (event: CompanyDetailTabChangeEvent) => {
311
+ setActiveTab(event.tab);
312
+ // Example: Next.js router
313
+ // router.push(event.path ?? `/companies/${data.company.slug}`);
314
+ };
315
+
316
+ return (
317
+ <CompanyDetail
318
+ company={data.company}
319
+ jobs={data.jobs}
320
+ news={data.news}
321
+ events={data.events}
322
+ activeTab={activeTab}
323
+ tabPaths={{
324
+ overview: `/companies/${data.company.slug}`,
325
+ products: `/companies/${data.company.slug}/products`,
326
+ trust: `/companies/${data.company.slug}/trust`,
327
+ people: `/companies/${data.company.slug}/people`,
328
+ jobs: `/companies/${data.company.slug}/jobs`,
329
+ news: `/companies/${data.company.slug}/news`,
330
+ events: `/companies/${data.company.slug}/events`,
331
+ insights: `/companies/${data.company.slug}/insights`,
332
+ }}
333
+ onTabChange={handleTabChange}
334
+ />
335
+ );
336
+ }
337
+ ```
338
+
339
+
251
340
  ## Dashboard tab routing events
252
341
 
253
342
  The Dashboard component can emit a routing-friendly event whenever a tab is selected. Use it to keep your app router in sync (for example, pushing routes in Next.js). You can also pass an `activeTab` prop to control the active tab from outside, along with a `tabPaths` map so your app remains the source of truth for URL formats.
package/dist/index.js CHANGED
@@ -7839,4 +7839,4 @@ For more information, see https://radix-ui.com/primitives/docs/components/alert-
7839
7839
  - less than the value passed to \`max\` (or ${sN} if no \`max\` prop is set)
7840
7840
  - \`null\` or \`undefined\` if the progress is indeterminate.
7841
7841
 
7842
- Defaulting to \`null\`.`}var FT=DT,tZ=zT;const OT=g.forwardRef(({className:t,value:a,...n},r)=>e.jsx(FT,{ref:r,className:fe("relative h-4 w-full overflow-hidden rounded-full bg-secondary",t),...n,children:e.jsx(tZ,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(a||0)}%)`}})}));OT.displayName=FT.displayName;function aZ({enrolledCourses:t,savedCourses:a,recommendedCourses:n,certificates:r,onEnroll:s,onContinue:i,onExplore:o,onSave:l,onRemoveSaved:d,onRemoveRecommended:h}){const[u,p]=M.useState({enrolled:t||[],recommended:n||[],saved:a||[]});M.useEffect(()=>{p({enrolled:t||[],recommended:n||[],saved:a||[]})},[t,n,a]);const y=k=>s(k),m=k=>{p(w=>{if(w.saved.some(j=>j.id===k.id))return w;const C={...w,saved:[...w.saved,{...k,saved:!0}],recommended:w.recommended.map(j=>j.id===k.id?{...j,saved:!0}:j)};return l==null||l(k.id),C})},x=k=>{p(w=>{const b={...w,saved:w.saved.filter(C=>C.id!==k),recommended:w.recommended.map(C=>C.id===k?{...C,saved:!1}:C)};return d==null||d(k),b})},f=k=>{p(w=>{const b={...w,recommended:w.recommended.filter(C=>C.id!==k)};return h==null||h(k),b})},v=({course:k,view:w})=>{const b=u.saved.some(C=>C.id===k.id);return e.jsxs(Q,{children:[e.jsx(le,{children:e.jsxs("div",{className:"flex justify-between items-start",children:[e.jsxs("div",{className:"flex-1",children:[e.jsx(ue,{className:"text-lg",children:k.title}),e.jsx(Se,{children:k.provider})]}),e.jsx(he,{variant:"outline",children:k.level})]})}),e.jsx(ee,{children:e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex items-center gap-4 text-sm text-muted-foreground",children:[e.jsx("span",{children:k.duration}),k.certificate&&e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(na,{className:"h-4 w-4"}),"Certificate"]})]}),e.jsx("div",{className:"flex flex-wrap gap-2",children:k.tags.map(C=>e.jsx(he,{variant:"secondary",children:C},C))}),w==="enrolled"&&k.progress!==void 0&&e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex justify-between text-sm",children:[e.jsx("span",{className:"text-muted-foreground",children:"Progress"}),e.jsxs("span",{className:"font-medium",children:[k.progress,"%"]})]}),e.jsx(OT,{value:k.progress})]}),w==="recommended"&&k.reason&&e.jsxs("p",{className:"text-xs text-muted-foreground italic",children:["💡 ",k.reason]}),e.jsxs("div",{className:"flex flex-col gap-2 sm:flex-row sm:flex-wrap",children:[w==="enrolled"&&e.jsx(T,{className:"sm:w-auto w-full",onClick:()=>i(k.id),children:"Continue Learning"}),w==="recommended"&&e.jsxs(e.Fragment,{children:[e.jsx(T,{className:"sm:w-auto w-full",onClick:()=>y(k.id),children:"Enroll Now"}),e.jsx(T,{variant:b?"secondary":"outline",className:"sm:w-auto w-full",size:"sm",disabled:b,onClick:()=>m(k),children:b?"Saved":"Save Course"}),e.jsx(T,{variant:"destructive",size:"sm",className:"sm:w-auto w-full",onClick:()=>f(k.id),children:"Remove"}),!h&&e.jsx("p",{className:"text-[11px] text-muted-foreground",children:"Remove not available yet"})]}),w==="saved"&&e.jsxs(e.Fragment,{children:[e.jsx(T,{className:"sm:w-auto w-full",size:"sm",onClick:()=>y(k.id),children:"Start Course"}),e.jsx(T,{variant:"destructive",size:"sm",className:"sm:w-auto w-full",onClick:()=>x(k.id),children:"Remove Saved"}),!d&&e.jsx("p",{className:"text-[11px] text-muted-foreground",children:"Remove from saved not available yet"})]})]})]})})]})};return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-3xl font-bold",children:"Courses"}),e.jsx("p",{className:"text-muted-foreground mt-1",children:"Advance your iGaming career"})]}),e.jsx(T,{onClick:o,children:"Explore All Courses"})]}),e.jsxs(nn,{defaultValue:"enrolled",className:"w-full",children:[e.jsxs(rn,{className:"grid w-full grid-cols-3 lg:grid-cols-4",children:[e.jsxs(Pe,{value:"enrolled",children:[e.jsx(ia,{className:"h-4 w-4 mr-2"}),"Enrolled (",u.enrolled.length,")"]}),e.jsxs(Pe,{value:"recommended",children:[e.jsx(Pa,{className:"h-4 w-4 mr-2"}),"Recommended (",u.recommended.length,")"]}),e.jsxs(Pe,{value:"saved",children:[e.jsx(fa,{className:"h-4 w-4 mr-2"}),"Saved (",u.saved.length,")"]}),e.jsxs(Pe,{value:"certificates",children:[e.jsx(na,{className:"h-4 w-4 mr-2"}),"Certificates (",r.length,")"]})]}),e.jsx(je,{value:"enrolled",className:"space-y-4",children:e.jsx("div",{className:"grid gap-4 md:grid-cols-2",children:u.enrolled.length===0?e.jsx(Q,{className:"md:col-span-2",children:e.jsxs(ee,{className:"flex flex-col items-center justify-center py-10",children:[e.jsx(ia,{className:"h-12 w-12 text-muted-foreground mb-4"}),e.jsx("p",{className:"text-muted-foreground",children:"No enrolled courses yet"}),e.jsx(T,{variant:"link",className:"mt-2",onClick:o,children:"Browse Courses"})]})}):u.enrolled.map(k=>e.jsx(v,{course:k,view:"enrolled"},k.id))})}),e.jsx(je,{value:"recommended",className:"space-y-4",children:e.jsx("div",{className:"grid gap-4 md:grid-cols-2",children:u.recommended.map(k=>e.jsx(v,{course:k,view:"recommended"},k.id))})}),e.jsx(je,{value:"saved",className:"space-y-4",children:e.jsx("div",{className:"grid gap-4 md:grid-cols-2",children:u.saved.length===0?e.jsx(Q,{className:"md:col-span-2",children:e.jsxs(ee,{className:"flex flex-col items-center justify-center py-10",children:[e.jsx(fa,{className:"h-12 w-12 text-muted-foreground mb-4"}),e.jsx("p",{className:"text-muted-foreground",children:"No saved courses yet"}),e.jsx(T,{variant:"link",className:"mt-2",onClick:o,children:"Browse Courses"}),!l&&e.jsx("p",{className:"text-[11px] text-muted-foreground mt-2",children:"Saving courses not available yet"})]})}):u.saved.map(k=>e.jsx(v,{course:k,view:"saved"},k.id))})}),e.jsx(je,{value:"certificates",className:"space-y-4",children:e.jsx("div",{className:"grid gap-4 md:grid-cols-2",children:r.length===0?e.jsx(Q,{className:"md:col-span-2",children:e.jsxs(ee,{className:"flex flex-col items-center justify-center py-10",children:[e.jsx(na,{className:"h-12 w-12 text-muted-foreground mb-4"}),e.jsx("p",{className:"text-muted-foreground",children:"No certificates yet"}),e.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Complete courses to earn certificates"})]})}):r.map(k=>e.jsxs(Q,{children:[e.jsx(le,{children:e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("div",{className:"p-2 rounded-lg bg-accent/10",children:e.jsx(na,{className:"h-6 w-6 text-accent"})}),e.jsxs("div",{className:"flex-1",children:[e.jsx(ue,{className:"text-base",children:k.title}),e.jsx(Se,{children:k.issuer}),e.jsxs("p",{className:"text-xs text-muted-foreground mt-1",children:["Issued: ",k.date]})]})]})}),e.jsx(ee,{children:e.jsx(T,{variant:"outline",size:"sm",className:"w-full",children:"Download Certificate"})})]},k.id))})})]})]})}function nZ({recommendedNews:t,savedArticles:a,categories:n,selectedCategory:r,onRead:s,onSave:i,onRemoveSaved:o,onRemoveRecommended:l,onCategoryChange:d,onManagePreferences:h}){const[u,p]=M.useState({recommended:t||[],saved:a||[]});M.useEffect(()=>{p({recommended:t||[],saved:a||[]})},[t,a]);const y=f=>{p(v=>{if(v.saved.some(b=>b.id===f.id))return v;const w={recommended:v.recommended.map(b=>b.id===f.id?{...b,saved:!0}:b),saved:[...v.saved,{...f,saved:!0}]};return i(f.id),w})},m=f=>{p(v=>{const k={recommended:v.recommended.map(w=>w.id===f?{...w,saved:!1}:w),saved:v.saved.filter(w=>w.id!==f)};return o==null||o(f),k})},x=f=>{p(v=>{const k={...v,recommended:v.recommended.filter(w=>w.id!==f)};return l==null||l(f),k})};return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-3xl font-bold",children:"News"}),e.jsx("p",{className:"text-muted-foreground mt-1",children:"Stay updated with iGaming industry"})]}),e.jsxs(T,{variant:"outline",onClick:h,children:[e.jsx(Cn,{className:"h-4 w-4 mr-2"}),"Preferences"]})]}),e.jsxs(nn,{defaultValue:"recommended",className:"w-full",children:[e.jsxs(rn,{children:[e.jsxs(Pe,{value:"recommended",children:[e.jsx(Aa,{className:"h-4 w-4 mr-2"}),"Recommended (",u.recommended.length,")"]}),e.jsxs(Pe,{value:"saved",children:[e.jsx(fa,{className:"h-4 w-4 mr-2"}),"Saved (",u.saved.length,")"]})]}),e.jsxs(je,{value:"recommended",className:"space-y-4",children:[e.jsxs("div",{className:"flex flex-wrap gap-2 mb-4",children:[e.jsx(T,{variant:r==="all"?"default":"outline",size:"sm",onClick:()=>d("all"),children:"All"}),n.map(f=>e.jsx(T,{variant:r===f?"default":"outline",size:"sm",onClick:()=>d(f),children:f},f))]}),e.jsx("div",{className:"grid gap-4 md:grid-cols-2",children:u.recommended.map(f=>e.jsx(qC,{article:f,view:"recommended",isSaved:u.saved.some(v=>v.id===f.id),onRead:s,onSave:y,onRemove:x},f.id))})]}),e.jsx(je,{value:"saved",className:"space-y-4",children:e.jsx("div",{className:"grid gap-4 md:grid-cols-2",children:u.saved.length===0?e.jsx(Q,{className:"md:col-span-2",children:e.jsxs(ee,{className:"flex flex-col items-center justify-center py-10",children:[e.jsx(fa,{className:"h-12 w-12 text-muted-foreground mb-4"}),e.jsx("p",{className:"text-muted-foreground",children:"No saved articles yet"}),e.jsx(T,{variant:"link",className:"mt-2",onClick:h,children:"Browse News"})]})}):u.saved.map(f=>e.jsx(qC,{article:f,view:"saved",onRead:s,onRemove:m},f.id))})})]})]})}function rZ({settings:t,onUpdate:a}){const{notifications:n,connectedAccounts:r,subscription:s}=t,i=d=>{a({action:"notifications",updates:d})},o=d=>{a({action:"connect-account",platform:d})},l=d=>{a({action:"disconnect-account",accountId:d})};return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-3xl font-bold",children:"Settings"}),e.jsx("p",{className:"text-muted-foreground mt-1",children:"Manage your account preferences"})]}),e.jsxs(nn,{defaultValue:"notifications",className:"w-full",children:[e.jsxs(rn,{children:[e.jsxs(Pe,{value:"notifications",children:[e.jsx(Yo,{className:"h-4 w-4 mr-2"}),"Notifications"]}),e.jsxs(Pe,{value:"account",children:[e.jsx(An,{className:"h-4 w-4 mr-2"}),"Account"]}),e.jsxs(Pe,{value:"subscription",children:[e.jsx(zc,{className:"h-4 w-4 mr-2"}),"Subscription"]}),e.jsxs(Pe,{value:"connected",children:[e.jsx(Uc,{className:"h-4 w-4 mr-2"}),"Connected"]})]}),e.jsx(je,{value:"notifications",children:e.jsxs(Q,{children:[e.jsxs(le,{children:[e.jsx(ue,{children:"Notification Preferences"}),e.jsx(Se,{children:"Choose how you want to be notified"})]}),e.jsxs(ee,{className:"space-y-6",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx(O,{htmlFor:"email-notif",className:"text-base",children:"Email Notifications"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Receive updates via email"})]}),e.jsx(ut,{id:"email-notif",checked:n.emailNotifications,onCheckedChange:d=>i({emailNotifications:d})})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx(O,{htmlFor:"push-notif",className:"text-base",children:"Push Notifications"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Browser push notifications"})]}),e.jsx(ut,{id:"push-notif",checked:n.pushNotifications,onCheckedChange:d=>i({pushNotifications:d})})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx(O,{htmlFor:"weekly-digest",className:"text-base",children:"Weekly Digest"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Summary of activities"})]}),e.jsx(ut,{id:"weekly-digest",checked:n.weeklyDigest,onCheckedChange:d=>i({weeklyDigest:d})})]}),e.jsxs("div",{className:"border-t pt-4 space-y-4",children:[e.jsx("h4",{className:"font-medium",children:"Content Alerts"}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(O,{htmlFor:"job-alerts-set",children:"Job Alerts"}),e.jsx(ut,{id:"job-alerts-set",checked:n.jobAlerts,onCheckedChange:d=>i({jobAlerts:d})})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(O,{htmlFor:"course-updates",children:"Course Updates"}),e.jsx(ut,{id:"course-updates",checked:n.courseUpdates,onCheckedChange:d=>i({courseUpdates:d})})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(O,{htmlFor:"news-digest",children:"News Digest"}),e.jsx(ut,{id:"news-digest",checked:n.newsDigest,onCheckedChange:d=>i({newsDigest:d})})]})]})]})]})}),e.jsx(je,{value:"account",children:e.jsxs("div",{className:"space-y-4",children:[e.jsxs(Q,{children:[e.jsxs(le,{children:[e.jsx(ue,{children:"Password"}),e.jsx(Se,{children:"Change your account password"})]}),e.jsx(ee,{children:e.jsx(T,{onClick:()=>a({action:"change-password"}),children:"Change Password"})})]}),e.jsxs(Q,{children:[e.jsxs(le,{children:[e.jsx(ue,{children:"Delete Account"}),e.jsx(Se,{children:"Permanently delete your account and all data"})]}),e.jsx(ee,{children:e.jsx(T,{variant:"destructive",onClick:()=>a({action:"delete-account"}),children:"Delete Account"})})]})]})}),e.jsx(je,{value:"subscription",children:e.jsxs(Q,{children:[e.jsx(le,{children:e.jsxs("div",{className:"flex justify-between items-start",children:[e.jsxs("div",{children:[e.jsx(ue,{children:"Subscription Plan"}),e.jsx(Se,{children:"Manage your membership"})]}),s.isPremium&&e.jsx(he,{children:"Premium"})]})}),e.jsx(ee,{className:"space-y-4",children:s.isPremium?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"p-4 border rounded-lg bg-accent/5",children:[e.jsx("h4",{className:"font-semibold mb-2",children:"Premium Benefits"}),e.jsxs("ul",{className:"space-y-1 text-sm text-muted-foreground",children:[e.jsx("li",{children:"✓ Unlimited job applications"}),e.jsx("li",{children:"✓ Access to all courses"}),e.jsx("li",{children:"✓ Priority support"}),e.jsx("li",{children:"✓ Advanced analytics"}),e.jsx("li",{children:"✓ Ad-free experience"})]})]}),e.jsx(T,{variant:"outline",children:"Manage Subscription"})]}):e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:"Upgrade to Premium to unlock exclusive features"}),e.jsx(T,{onClick:()=>a({action:"upgrade",plan:"premium"}),children:"Upgrade to Premium"})]})})]})}),e.jsx(je,{value:"connected",children:e.jsxs(Q,{children:[e.jsxs(le,{children:[e.jsx(ue,{children:"Connected Accounts"}),e.jsx(Se,{children:"Manage linked accounts and integrations"})]}),e.jsx(ee,{className:"space-y-4",children:r.map(d=>e.jsxs("div",{className:"flex items-center justify-between p-4 border rounded-lg",children:[e.jsxs("div",{children:[e.jsx("h4",{className:"font-medium",children:d.platform}),d.connected&&d.email&&e.jsx("p",{className:"text-sm text-muted-foreground",children:d.email})]}),d.connected?e.jsx(T,{variant:"outline",size:"sm",onClick:()=>l(d.id),children:"Disconnect"}):e.jsx(T,{size:"sm",onClick:()=>o(d.platform),children:"Connect"})]},d.id))})]})})]})]})}function sZ({user:t,profileData:a,jobsDashboard:n,alerts:r,snapshot:s,feedItems:i,onUploadCV:o,cvPreviewText:l,cvPreviewStatus:d,cvPreviewErrorMessage:h,coursesData:u,newsData:p,settingsData:y,onUpdateProfile:m,activeTab:x,tabPaths:f,onTabChange:v}){const[k,w]=M.useState(x??"overview");M.useEffect(()=>{x&&w(x)},[x]);const b=n||(a==null?void 0:a.jobsDashboard)||{savedJobs:[],recommendedJobs:[],applications:[]},C=()=>console.log("/logout"),j=A=>console.log(A),I=async A=>{await m({type:"courses",payload:A})},N=(...A)=>console.log("Action:",...A),S=async A=>{await m({type:"news",payload:A})},L=y||{notifications:{emailNotifications:!0,pushNotifications:!1,weeklyDigest:!0,jobAlerts:!0,courseUpdates:!0,newsDigest:!1},connectedAccounts:[{id:"google_89213",platform:"Google",connected:!0,email:t.email},{id:"linkedin_55521",platform:"LinkedIn",connected:!1}],subscription:{isPremium:!1,plan:"free",renewalDate:null}},q=async A=>{await m({type:"settings",payload:A})},_=A=>{const D=A;x||w(D),v==null||v({tab:D,path:f==null?void 0:f[D]})};return e.jsx(sW,{user:t,onLogout:C,onNavigate:j,currentPath:"/dashboard",notificationCount:r.length,children:e.jsxs(nn,{value:x??k,onValueChange:_,className:"w-full",children:[e.jsxs(rn,{className:"grid w-full grid-cols-3 lg:grid-cols-6",children:[e.jsxs(Pe,{value:"overview",className:"flex items-center gap-2",children:[e.jsx(Ua,{className:"h-4 w-4"}),e.jsx("span",{className:"hidden sm:inline",children:"Overview"})]}),e.jsxs(Pe,{value:"profile",className:"flex items-center gap-2",children:[e.jsx(ic,{className:"h-4 w-4"}),e.jsx("span",{className:"hidden sm:inline",children:"Profile"})]}),e.jsxs(Pe,{value:"jobs",className:"flex items-center gap-2",children:[e.jsx(Ze,{className:"h-4 w-4"}),e.jsx("span",{className:"hidden sm:inline",children:"Jobs"})]}),e.jsxs(Pe,{value:"courses",className:"flex items-center gap-2",children:[e.jsx(ia,{className:"h-4 w-4"}),e.jsx("span",{className:"hidden sm:inline",children:"Courses"})]}),e.jsxs(Pe,{value:"news",className:"flex items-center gap-2",children:[e.jsx(Aa,{className:"h-4 w-4"}),e.jsx("span",{className:"hidden sm:inline",children:"News"})]}),e.jsxs(Pe,{value:"settings",className:"flex items-center gap-2",children:[e.jsx(vo,{className:"h-4 w-4"}),e.jsx("span",{className:"hidden sm:inline",children:"Settings"})]})]}),e.jsx(je,{value:"overview",className:"mt-6",children:e.jsx(iW,{userName:t.name,feedItems:i,alerts:r,snapshot:s,onSave:N,onApply:N,onEnroll:A=>I({action:"enroll",courseId:A}),onRead:A=>S({action:"read",articleId:A})})}),e.jsx(je,{value:"profile",className:"mt-6",children:e.jsx(VW,{profile:a,onUpdate:A=>m(A)})}),e.jsx(je,{value:"jobs",className:"mt-6",children:e.jsx(UW,{savedJobs:b.savedJobs,applications:b.applications,recommendedJobs:b.recommendedJobs,onApply:A=>console.log("Applied:",A),onRemove:A=>console.log("Removed:",A),onUploadCV:o??(A=>console.log("Upload CV changed:",(A==null?void 0:A.name)||"removed")),cvPreviewText:l,cvPreviewStatus:d,cvPreviewErrorMessage:h,onSetAlert:()=>console.log("Set alerts clicked"),onUpdateProfile:async A=>{await m({type:"jobs",payload:A.payload})}})}),e.jsx(je,{value:"courses",className:"mt-6",children:e.jsx(aZ,{enrolledCourses:(u==null?void 0:u.enrolledCourses)||[],savedCourses:(u==null?void 0:u.savedCourses)||[],recommendedCourses:(u==null?void 0:u.recommendedCourses)||[],certificates:(u==null?void 0:u.certificates)||[],onEnroll:A=>I({action:"enroll",courseId:A}),onContinue:A=>I({action:"continue",courseId:A}),onExplore:()=>I({action:"explore"}),onSave:A=>I({action:"save",courseId:A}),onRemoveSaved:A=>I({action:"remove-saved",courseId:A}),onRemoveRecommended:A=>I({action:"remove-recommended",courseId:A})})}),e.jsx(je,{value:"news",className:"mt-6",children:e.jsx(nZ,{recommendedNews:(p==null?void 0:p.recommendedNews)||[],savedArticles:(p==null?void 0:p.savedArticles)||[],categories:(p==null?void 0:p.categories)||[],selectedCategory:(p==null?void 0:p.selectedCategory)||"all",onRead:A=>S({action:"read",articleId:A}),onSave:A=>S({action:"save",articleId:A}),onRemoveSaved:A=>S({action:"remove-saved",articleId:A}),onRemoveRecommended:A=>S({action:"remove-recommended",articleId:A}),onCategoryChange:A=>S({action:"category",category:A}),onManagePreferences:()=>S({action:"manage-preferences"})})}),e.jsx(je,{value:"settings",className:"mt-6",children:e.jsx(rZ,{settings:L,onUpdate:q})})]})})}exports.Advantages=vA;exports.Analytics=BG;exports.Banner=fl;exports.Button=T;exports.CandidateCard=qR;exports.CandidateProfile=NH;exports.Cart=RA;exports.Chatbot=_A;exports.CompanyAdminCandidates=zR;exports.CompanyAdminEditDialog=PG;exports.CompanyAdminEvents=rT;exports.CompanyAdminJobs=sT;exports.CompanyAdminNews=iT;exports.CompanyAdminOverview=oT;exports.CompanyAdminPeople=cT;exports.CompanyAdminProducts=lT;exports.CompanyAdminSettings=gT;exports.CompanyAdminShell=AG;exports.CompanyClaim=SU;exports.CompanyDetail=xU;exports.CompanyDirectory=_R;exports.CompanyDirectoryContainer=CU;exports.CompanyGroupDetail=gU;exports.ConsentBanner=WA;exports.ConsentProvider=GA;exports.CourseTypes=DA;exports.Courses=MA;exports.CoursesPage=QO;exports.Dashboard=sZ;exports.Destinations=jA;exports.FAQ=AA;exports.FeatureJobs=rE;exports.Features=IA;exports.Footer=ME;exports.FooterLib=BA;exports.ForEmployers=qA;exports.ForgotPassword=eW;exports.Gallery=PA;exports.GroupPrices=jq;exports.Header=$O;exports.HeaderAlternative=VA;exports.Hero=CA;exports.HeroAlternative=zA;exports.HomePage=nE;exports.IgamingCareerHome=yE;exports.Input=de;exports.JobDetailPage=BO;exports.JobListings=bE;exports.JobSearchWidget=HA;exports.Listing=FO;exports.Login=WG;exports.MobileNav=XA;exports.Navbar=jE;exports.NewsPage=GO;exports.Newsletter=OA;exports.NotificationModal=ZA;exports.Partners=$A;exports.Register=JG;exports.RegisterV2=KG;exports.SearchableSelect=Xj;exports.Services=SA;exports.ServicesNoIcons=TA;exports.SidebarNewsletter=uS;exports.SignInPromptModal=nW;exports.SlidingSummary=Cq;exports.TagBadge=VC;exports.TagPicker=zD;exports.Testimonials=NA;exports.TrustSignals=FA;exports.ValueProposition=EA;exports.Videos=LA;exports.canEditSection=_G;exports.getEnabledPermissions=RG;exports.useConsent=hS;
7842
+ Defaulting to \`null\`.`}var FT=DT,tZ=zT;const OT=g.forwardRef(({className:t,value:a,...n},r)=>e.jsx(FT,{ref:r,className:fe("relative h-4 w-full overflow-hidden rounded-full bg-secondary",t),...n,children:e.jsx(tZ,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(a||0)}%)`}})}));OT.displayName=FT.displayName;function aZ({enrolledCourses:t,savedCourses:a,recommendedCourses:n,certificates:r,onEnroll:s,onContinue:i,onExplore:o,onSave:l,onRemoveSaved:d,onRemoveRecommended:h}){const[u,p]=M.useState({enrolled:t||[],recommended:n||[],saved:a||[]});M.useEffect(()=>{p({enrolled:t||[],recommended:n||[],saved:a||[]})},[t,n,a]);const y=k=>s(k),m=k=>{p(w=>{if(w.saved.some(j=>j.id===k.id))return w;const C={...w,saved:[...w.saved,{...k,saved:!0}],recommended:w.recommended.map(j=>j.id===k.id?{...j,saved:!0}:j)};return l==null||l(k.id),C})},x=k=>{p(w=>{const b={...w,saved:w.saved.filter(C=>C.id!==k),recommended:w.recommended.map(C=>C.id===k?{...C,saved:!1}:C)};return d==null||d(k),b})},f=k=>{p(w=>{const b={...w,recommended:w.recommended.filter(C=>C.id!==k)};return h==null||h(k),b})},v=({course:k,view:w})=>{const b=u.saved.some(C=>C.id===k.id);return e.jsxs(Q,{children:[e.jsx(le,{children:e.jsxs("div",{className:"flex justify-between items-start",children:[e.jsxs("div",{className:"flex-1",children:[e.jsx(ue,{className:"text-lg",children:k.title}),e.jsx(Se,{children:k.provider})]}),e.jsx(he,{variant:"outline",children:k.level})]})}),e.jsx(ee,{children:e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex items-center gap-4 text-sm text-muted-foreground",children:[e.jsx("span",{children:k.duration}),k.certificate&&e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(na,{className:"h-4 w-4"}),"Certificate"]})]}),e.jsx("div",{className:"flex flex-wrap gap-2",children:k.tags.map(C=>e.jsx(he,{variant:"secondary",children:C},C))}),w==="enrolled"&&k.progress!==void 0&&e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex justify-between text-sm",children:[e.jsx("span",{className:"text-muted-foreground",children:"Progress"}),e.jsxs("span",{className:"font-medium",children:[k.progress,"%"]})]}),e.jsx(OT,{value:k.progress})]}),w==="recommended"&&k.reason&&e.jsxs("p",{className:"text-xs text-muted-foreground italic",children:["💡 ",k.reason]}),e.jsxs("div",{className:"flex flex-col gap-2 sm:flex-row sm:flex-wrap",children:[w==="enrolled"&&e.jsx(T,{className:"sm:w-auto w-full",onClick:()=>i(k.id),children:"Continue Learning"}),w==="recommended"&&e.jsxs(e.Fragment,{children:[e.jsx(T,{className:"sm:w-auto w-full",onClick:()=>y(k.id),children:"Enroll Now"}),e.jsx(T,{variant:b?"secondary":"outline",className:"sm:w-auto w-full",size:"sm",disabled:b,onClick:()=>m(k),children:b?"Saved":"Save Course"}),e.jsx(T,{variant:"destructive",size:"sm",className:"sm:w-auto w-full",onClick:()=>f(k.id),children:"Remove"}),!h&&e.jsx("p",{className:"text-[11px] text-muted-foreground",children:"Remove not available yet"})]}),w==="saved"&&e.jsxs(e.Fragment,{children:[e.jsx(T,{className:"sm:w-auto w-full",size:"sm",onClick:()=>y(k.id),children:"Start Course"}),e.jsx(T,{variant:"destructive",size:"sm",className:"sm:w-auto w-full",onClick:()=>x(k.id),children:"Remove Saved"}),!d&&e.jsx("p",{className:"text-[11px] text-muted-foreground",children:"Remove from saved not available yet"})]})]})]})})]})};return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-3xl font-bold",children:"Courses"}),e.jsx("p",{className:"text-muted-foreground mt-1",children:"Advance your iGaming career"})]}),e.jsx(T,{onClick:o,children:"Explore All Courses"})]}),e.jsxs(nn,{defaultValue:"enrolled",className:"w-full",children:[e.jsxs(rn,{className:"grid w-full grid-cols-3 lg:grid-cols-4",children:[e.jsxs(Pe,{value:"enrolled",children:[e.jsx(ia,{className:"h-4 w-4 mr-2"}),"Enrolled (",u.enrolled.length,")"]}),e.jsxs(Pe,{value:"recommended",children:[e.jsx(Pa,{className:"h-4 w-4 mr-2"}),"Recommended (",u.recommended.length,")"]}),e.jsxs(Pe,{value:"saved",children:[e.jsx(fa,{className:"h-4 w-4 mr-2"}),"Saved (",u.saved.length,")"]}),e.jsxs(Pe,{value:"certificates",children:[e.jsx(na,{className:"h-4 w-4 mr-2"}),"Certificates (",r.length,")"]})]}),e.jsx(je,{value:"enrolled",className:"space-y-4",children:e.jsx("div",{className:"grid gap-4 md:grid-cols-2",children:u.enrolled.length===0?e.jsx(Q,{className:"md:col-span-2",children:e.jsxs(ee,{className:"flex flex-col items-center justify-center py-10",children:[e.jsx(ia,{className:"h-12 w-12 text-muted-foreground mb-4"}),e.jsx("p",{className:"text-muted-foreground",children:"No enrolled courses yet"}),e.jsx(T,{variant:"link",className:"mt-2",onClick:o,children:"Browse Courses"})]})}):u.enrolled.map(k=>e.jsx(v,{course:k,view:"enrolled"},k.id))})}),e.jsx(je,{value:"recommended",className:"space-y-4",children:e.jsx("div",{className:"grid gap-4 md:grid-cols-2",children:u.recommended.map(k=>e.jsx(v,{course:k,view:"recommended"},k.id))})}),e.jsx(je,{value:"saved",className:"space-y-4",children:e.jsx("div",{className:"grid gap-4 md:grid-cols-2",children:u.saved.length===0?e.jsx(Q,{className:"md:col-span-2",children:e.jsxs(ee,{className:"flex flex-col items-center justify-center py-10",children:[e.jsx(fa,{className:"h-12 w-12 text-muted-foreground mb-4"}),e.jsx("p",{className:"text-muted-foreground",children:"No saved courses yet"}),e.jsx(T,{variant:"link",className:"mt-2",onClick:o,children:"Browse Courses"}),!l&&e.jsx("p",{className:"text-[11px] text-muted-foreground mt-2",children:"Saving courses not available yet"})]})}):u.saved.map(k=>e.jsx(v,{course:k,view:"saved"},k.id))})}),e.jsx(je,{value:"certificates",className:"space-y-4",children:e.jsx("div",{className:"grid gap-4 md:grid-cols-2",children:r.length===0?e.jsx(Q,{className:"md:col-span-2",children:e.jsxs(ee,{className:"flex flex-col items-center justify-center py-10",children:[e.jsx(na,{className:"h-12 w-12 text-muted-foreground mb-4"}),e.jsx("p",{className:"text-muted-foreground",children:"No certificates yet"}),e.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:"Complete courses to earn certificates"})]})}):r.map(k=>e.jsxs(Q,{children:[e.jsx(le,{children:e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("div",{className:"p-2 rounded-lg bg-accent/10",children:e.jsx(na,{className:"h-6 w-6 text-accent"})}),e.jsxs("div",{className:"flex-1",children:[e.jsx(ue,{className:"text-base",children:k.title}),e.jsx(Se,{children:k.issuer}),e.jsxs("p",{className:"text-xs text-muted-foreground mt-1",children:["Issued: ",k.date]})]})]})}),e.jsx(ee,{children:e.jsx(T,{variant:"outline",size:"sm",className:"w-full",children:"Download Certificate"})})]},k.id))})})]})]})}function nZ({recommendedNews:t,savedArticles:a,categories:n,selectedCategory:r,onRead:s,onSave:i,onRemoveSaved:o,onRemoveRecommended:l,onCategoryChange:d,onManagePreferences:h}){const[u,p]=M.useState({recommended:t||[],saved:a||[]});M.useEffect(()=>{p({recommended:t||[],saved:a||[]})},[t,a]);const y=f=>{p(v=>{if(v.saved.some(b=>b.id===f.id))return v;const w={recommended:v.recommended.map(b=>b.id===f.id?{...b,saved:!0}:b),saved:[...v.saved,{...f,saved:!0}]};return i(f.id),w})},m=f=>{p(v=>{const k={recommended:v.recommended.map(w=>w.id===f?{...w,saved:!1}:w),saved:v.saved.filter(w=>w.id!==f)};return o==null||o(f),k})},x=f=>{p(v=>{const k={...v,recommended:v.recommended.filter(w=>w.id!==f)};return l==null||l(f),k})};return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-3xl font-bold",children:"News"}),e.jsx("p",{className:"text-muted-foreground mt-1",children:"Stay updated with iGaming industry"})]}),e.jsxs(T,{variant:"outline",onClick:h,children:[e.jsx(Cn,{className:"h-4 w-4 mr-2"}),"Preferences"]})]}),e.jsxs(nn,{defaultValue:"recommended",className:"w-full",children:[e.jsxs(rn,{children:[e.jsxs(Pe,{value:"recommended",children:[e.jsx(Aa,{className:"h-4 w-4 mr-2"}),"Recommended (",u.recommended.length,")"]}),e.jsxs(Pe,{value:"saved",children:[e.jsx(fa,{className:"h-4 w-4 mr-2"}),"Saved (",u.saved.length,")"]})]}),e.jsxs(je,{value:"recommended",className:"space-y-4",children:[e.jsxs("div",{className:"flex flex-wrap gap-2 mb-4",children:[e.jsx(T,{variant:r==="all"?"default":"outline",size:"sm",onClick:()=>d("all"),children:"All"}),n.map(f=>e.jsx(T,{variant:r===f?"default":"outline",size:"sm",onClick:()=>d(f),children:f},f))]}),e.jsx("div",{className:"grid gap-4 md:grid-cols-2",children:u.recommended.map(f=>e.jsx(qC,{article:f,view:"recommended",isSaved:u.saved.some(v=>v.id===f.id),onRead:s,onSave:y,onRemove:x},f.id))})]}),e.jsx(je,{value:"saved",className:"space-y-4",children:e.jsx("div",{className:"grid gap-4 md:grid-cols-2",children:u.saved.length===0?e.jsx(Q,{className:"md:col-span-2",children:e.jsxs(ee,{className:"flex flex-col items-center justify-center py-10",children:[e.jsx(fa,{className:"h-12 w-12 text-muted-foreground mb-4"}),e.jsx("p",{className:"text-muted-foreground",children:"No saved articles yet"}),e.jsx(T,{variant:"link",className:"mt-2",onClick:h,children:"Browse News"})]})}):u.saved.map(f=>e.jsx(qC,{article:f,view:"saved",onRead:s,onRemove:m},f.id))})})]})]})}function rZ({settings:t,onUpdate:a}){const{notifications:n,connectedAccounts:r,subscription:s}=t,i=d=>{a({action:"notifications",updates:d})},o=d=>{a({action:"connect-account",platform:d})},l=d=>{a({action:"disconnect-account",accountId:d})};return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-3xl font-bold",children:"Settings"}),e.jsx("p",{className:"text-muted-foreground mt-1",children:"Manage your account preferences"})]}),e.jsxs(nn,{defaultValue:"notifications",className:"w-full",children:[e.jsxs(rn,{className:"grid w-full grid-cols-3 lg:grid-cols-7",children:[e.jsxs(Pe,{value:"notifications",children:[e.jsx(Yo,{className:"h-4 w-4 mr-2"}),"Notifications"]}),e.jsxs(Pe,{value:"account",children:[e.jsx(An,{className:"h-4 w-4 mr-2"}),"Account"]}),e.jsxs(Pe,{value:"subscription",children:[e.jsx(zc,{className:"h-4 w-4 mr-2"}),"Subscription"]}),e.jsxs(Pe,{value:"connected",children:[e.jsx(Uc,{className:"h-4 w-4 mr-2"}),"Connected"]})]}),e.jsx(je,{value:"notifications",children:e.jsxs(Q,{children:[e.jsxs(le,{children:[e.jsx(ue,{children:"Notification Preferences"}),e.jsx(Se,{children:"Choose how you want to be notified"})]}),e.jsxs(ee,{className:"space-y-6",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx(O,{htmlFor:"email-notif",className:"text-base",children:"Email Notifications"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Receive updates via email"})]}),e.jsx(ut,{id:"email-notif",checked:n.emailNotifications,onCheckedChange:d=>i({emailNotifications:d})})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx(O,{htmlFor:"push-notif",className:"text-base",children:"Push Notifications"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Browser push notifications"})]}),e.jsx(ut,{id:"push-notif",checked:n.pushNotifications,onCheckedChange:d=>i({pushNotifications:d})})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx(O,{htmlFor:"weekly-digest",className:"text-base",children:"Weekly Digest"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Summary of activities"})]}),e.jsx(ut,{id:"weekly-digest",checked:n.weeklyDigest,onCheckedChange:d=>i({weeklyDigest:d})})]}),e.jsxs("div",{className:"border-t pt-4 space-y-4",children:[e.jsx("h4",{className:"font-medium",children:"Content Alerts"}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(O,{htmlFor:"job-alerts-set",children:"Job Alerts"}),e.jsx(ut,{id:"job-alerts-set",checked:n.jobAlerts,onCheckedChange:d=>i({jobAlerts:d})})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(O,{htmlFor:"course-updates",children:"Course Updates"}),e.jsx(ut,{id:"course-updates",checked:n.courseUpdates,onCheckedChange:d=>i({courseUpdates:d})})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(O,{htmlFor:"news-digest",children:"News Digest"}),e.jsx(ut,{id:"news-digest",checked:n.newsDigest,onCheckedChange:d=>i({newsDigest:d})})]})]})]})]})}),e.jsx(je,{value:"account",children:e.jsxs("div",{className:"space-y-4",children:[e.jsxs(Q,{children:[e.jsxs(le,{children:[e.jsx(ue,{children:"Password"}),e.jsx(Se,{children:"Change your account password"})]}),e.jsx(ee,{children:e.jsx(T,{onClick:()=>a({action:"change-password"}),children:"Change Password"})})]}),e.jsxs(Q,{children:[e.jsxs(le,{children:[e.jsx(ue,{children:"Delete Account"}),e.jsx(Se,{children:"Permanently delete your account and all data"})]}),e.jsx(ee,{children:e.jsx(T,{variant:"destructive",onClick:()=>a({action:"delete-account"}),children:"Delete Account"})})]})]})}),e.jsx(je,{value:"subscription",children:e.jsxs(Q,{children:[e.jsx(le,{children:e.jsxs("div",{className:"flex justify-between items-start",children:[e.jsxs("div",{children:[e.jsx(ue,{children:"Subscription Plan"}),e.jsx(Se,{children:"Manage your membership"})]}),s.isPremium&&e.jsx(he,{children:"Premium"})]})}),e.jsx(ee,{className:"space-y-4",children:s.isPremium?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"p-4 border rounded-lg bg-accent/5",children:[e.jsx("h4",{className:"font-semibold mb-2",children:"Premium Benefits"}),e.jsxs("ul",{className:"space-y-1 text-sm text-muted-foreground",children:[e.jsx("li",{children:"✓ Unlimited job applications"}),e.jsx("li",{children:"✓ Access to all courses"}),e.jsx("li",{children:"✓ Priority support"}),e.jsx("li",{children:"✓ Advanced analytics"}),e.jsx("li",{children:"✓ Ad-free experience"})]})]}),e.jsx(T,{variant:"outline",children:"Manage Subscription"})]}):e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:"Upgrade to Premium to unlock exclusive features"}),e.jsx(T,{onClick:()=>a({action:"upgrade",plan:"premium"}),children:"Upgrade to Premium"})]})})]})}),e.jsx(je,{value:"connected",children:e.jsxs(Q,{children:[e.jsxs(le,{children:[e.jsx(ue,{children:"Connected Accounts"}),e.jsx(Se,{children:"Manage linked accounts and integrations"})]}),e.jsx(ee,{className:"space-y-4",children:r.map(d=>e.jsxs("div",{className:"flex items-center justify-between p-4 border rounded-lg",children:[e.jsxs("div",{children:[e.jsx("h4",{className:"font-medium",children:d.platform}),d.connected&&d.email&&e.jsx("p",{className:"text-sm text-muted-foreground",children:d.email})]}),d.connected?e.jsx(T,{variant:"outline",size:"sm",onClick:()=>l(d.id),children:"Disconnect"}):e.jsx(T,{size:"sm",onClick:()=>o(d.platform),children:"Connect"})]},d.id))})]})})]})]})}function sZ({user:t,profileData:a,jobsDashboard:n,alerts:r,snapshot:s,feedItems:i,onUploadCV:o,cvPreviewText:l,cvPreviewStatus:d,cvPreviewErrorMessage:h,coursesData:u,newsData:p,settingsData:y,onUpdateProfile:m,activeTab:x,tabPaths:f,onTabChange:v}){const[k,w]=M.useState(x??"overview");M.useEffect(()=>{x&&w(x)},[x]);const b=n||(a==null?void 0:a.jobsDashboard)||{savedJobs:[],recommendedJobs:[],applications:[]},C=()=>console.log("/logout"),j=A=>console.log(A),I=async A=>{await m({type:"courses",payload:A})},N=(...A)=>console.log("Action:",...A),S=async A=>{await m({type:"news",payload:A})},L=y||{notifications:{emailNotifications:!0,pushNotifications:!1,weeklyDigest:!0,jobAlerts:!0,courseUpdates:!0,newsDigest:!1},connectedAccounts:[{id:"google_89213",platform:"Google",connected:!0,email:t.email},{id:"linkedin_55521",platform:"LinkedIn",connected:!1}],subscription:{isPremium:!1,plan:"free",renewalDate:null}},q=async A=>{await m({type:"settings",payload:A})},_=A=>{const D=A;x||w(D),v==null||v({tab:D,path:f==null?void 0:f[D]})};return e.jsx(sW,{user:t,onLogout:C,onNavigate:j,currentPath:"/dashboard",notificationCount:r.length,children:e.jsxs(nn,{value:x??k,onValueChange:_,className:"w-full",children:[e.jsxs(rn,{className:"grid w-full grid-cols-3 lg:grid-cols-6",children:[e.jsxs(Pe,{value:"overview",className:"flex items-center gap-2",children:[e.jsx(Ua,{className:"h-4 w-4"}),e.jsx("span",{className:"hidden sm:inline",children:"Overview"})]}),e.jsxs(Pe,{value:"profile",className:"flex items-center gap-2",children:[e.jsx(ic,{className:"h-4 w-4"}),e.jsx("span",{className:"hidden sm:inline",children:"Profile"})]}),e.jsxs(Pe,{value:"jobs",className:"flex items-center gap-2",children:[e.jsx(Ze,{className:"h-4 w-4"}),e.jsx("span",{className:"hidden sm:inline",children:"Jobs"})]}),e.jsxs(Pe,{value:"courses",className:"flex items-center gap-2",children:[e.jsx(ia,{className:"h-4 w-4"}),e.jsx("span",{className:"hidden sm:inline",children:"Courses"})]}),e.jsxs(Pe,{value:"news",className:"flex items-center gap-2",children:[e.jsx(Aa,{className:"h-4 w-4"}),e.jsx("span",{className:"hidden sm:inline",children:"News"})]}),e.jsxs(Pe,{value:"settings",className:"flex items-center gap-2",children:[e.jsx(vo,{className:"h-4 w-4"}),e.jsx("span",{className:"hidden sm:inline",children:"Settings"})]})]}),e.jsx(je,{value:"overview",className:"mt-6",children:e.jsx(iW,{userName:t.name,feedItems:i,alerts:r,snapshot:s,onSave:N,onApply:N,onEnroll:A=>I({action:"enroll",courseId:A}),onRead:A=>S({action:"read",articleId:A})})}),e.jsx(je,{value:"profile",className:"mt-6",children:e.jsx(VW,{profile:a,onUpdate:A=>m(A)})}),e.jsx(je,{value:"jobs",className:"mt-6",children:e.jsx(UW,{savedJobs:b.savedJobs,applications:b.applications,recommendedJobs:b.recommendedJobs,onApply:A=>console.log("Applied:",A),onRemove:A=>console.log("Removed:",A),onUploadCV:o??(A=>console.log("Upload CV changed:",(A==null?void 0:A.name)||"removed")),cvPreviewText:l,cvPreviewStatus:d,cvPreviewErrorMessage:h,onSetAlert:()=>console.log("Set alerts clicked"),onUpdateProfile:async A=>{await m({type:"jobs",payload:A.payload})}})}),e.jsx(je,{value:"courses",className:"mt-6",children:e.jsx(aZ,{enrolledCourses:(u==null?void 0:u.enrolledCourses)||[],savedCourses:(u==null?void 0:u.savedCourses)||[],recommendedCourses:(u==null?void 0:u.recommendedCourses)||[],certificates:(u==null?void 0:u.certificates)||[],onEnroll:A=>I({action:"enroll",courseId:A}),onContinue:A=>I({action:"continue",courseId:A}),onExplore:()=>I({action:"explore"}),onSave:A=>I({action:"save",courseId:A}),onRemoveSaved:A=>I({action:"remove-saved",courseId:A}),onRemoveRecommended:A=>I({action:"remove-recommended",courseId:A})})}),e.jsx(je,{value:"news",className:"mt-6",children:e.jsx(nZ,{recommendedNews:(p==null?void 0:p.recommendedNews)||[],savedArticles:(p==null?void 0:p.savedArticles)||[],categories:(p==null?void 0:p.categories)||[],selectedCategory:(p==null?void 0:p.selectedCategory)||"all",onRead:A=>S({action:"read",articleId:A}),onSave:A=>S({action:"save",articleId:A}),onRemoveSaved:A=>S({action:"remove-saved",articleId:A}),onRemoveRecommended:A=>S({action:"remove-recommended",articleId:A}),onCategoryChange:A=>S({action:"category",category:A}),onManagePreferences:()=>S({action:"manage-preferences"})})}),e.jsx(je,{value:"settings",className:"mt-6",children:e.jsx(rZ,{settings:L,onUpdate:q})})]})})}exports.Advantages=vA;exports.Analytics=BG;exports.Banner=fl;exports.Button=T;exports.CandidateCard=qR;exports.CandidateProfile=NH;exports.Cart=RA;exports.Chatbot=_A;exports.CompanyAdminCandidates=zR;exports.CompanyAdminEditDialog=PG;exports.CompanyAdminEvents=rT;exports.CompanyAdminJobs=sT;exports.CompanyAdminNews=iT;exports.CompanyAdminOverview=oT;exports.CompanyAdminPeople=cT;exports.CompanyAdminProducts=lT;exports.CompanyAdminSettings=gT;exports.CompanyAdminShell=AG;exports.CompanyClaim=SU;exports.CompanyDetail=xU;exports.CompanyDirectory=_R;exports.CompanyDirectoryContainer=CU;exports.CompanyGroupDetail=gU;exports.ConsentBanner=WA;exports.ConsentProvider=GA;exports.CourseTypes=DA;exports.Courses=MA;exports.CoursesPage=QO;exports.Dashboard=sZ;exports.Destinations=jA;exports.FAQ=AA;exports.FeatureJobs=rE;exports.Features=IA;exports.Footer=ME;exports.FooterLib=BA;exports.ForEmployers=qA;exports.ForgotPassword=eW;exports.Gallery=PA;exports.GroupPrices=jq;exports.Header=$O;exports.HeaderAlternative=VA;exports.Hero=CA;exports.HeroAlternative=zA;exports.HomePage=nE;exports.IgamingCareerHome=yE;exports.Input=de;exports.JobDetailPage=BO;exports.JobListings=bE;exports.JobSearchWidget=HA;exports.Listing=FO;exports.Login=WG;exports.MobileNav=XA;exports.Navbar=jE;exports.NewsPage=GO;exports.Newsletter=OA;exports.NotificationModal=ZA;exports.Partners=$A;exports.Register=JG;exports.RegisterV2=KG;exports.SearchableSelect=Xj;exports.Services=SA;exports.ServicesNoIcons=TA;exports.SidebarNewsletter=uS;exports.SignInPromptModal=nW;exports.SlidingSummary=Cq;exports.TagBadge=VC;exports.TagPicker=zD;exports.Testimonials=NA;exports.TrustSignals=FA;exports.ValueProposition=EA;exports.Videos=LA;exports.canEditSection=_G;exports.getEnabledPermissions=RG;exports.useConsent=hS;
package/dist/index.mjs CHANGED
@@ -56864,7 +56864,7 @@ function FW({
56864
56864
  /* @__PURE__ */ e.jsx("p", { className: "text-muted-foreground mt-1", children: "Manage your account preferences" })
56865
56865
  ] }),
56866
56866
  /* @__PURE__ */ e.jsxs(ln, { defaultValue: "notifications", className: "w-full", children: [
56867
- /* @__PURE__ */ e.jsxs(dn, { children: [
56867
+ /* @__PURE__ */ e.jsxs(dn, { className: "grid w-full grid-cols-3 lg:grid-cols-7", children: [
56868
56868
  /* @__PURE__ */ e.jsxs(_e, { value: "notifications", children: [
56869
56869
  /* @__PURE__ */ e.jsx(nc, { className: "h-4 w-4 mr-2" }),
56870
56870
  "Notifications"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@igamingcareer/igaming-components",
3
- "version": "1.0.90",
3
+ "version": "1.0.91",
4
4
  "description": "Reusable React component library for the iGamingCareer platform",
5
5
  "author": "iGamingCareer <info@igamingcareer.com>",
6
6
  "license": "MIT",