cortex-react-components 1.39.0 → 1.39.2

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.
Files changed (61) hide show
  1. package/dist/{chunk-7XSAYKJ7.mjs → chunk-3PC5BLK7.mjs} +1 -1
  2. package/dist/{chunk-DZCCRDJP.mjs → chunk-4ZCQ4OUP.mjs} +1 -1
  3. package/dist/{chunk-D2PXEOXW.mjs → chunk-D3727TBZ.mjs} +1 -1
  4. package/dist/{chunk-GHBJK554.mjs → chunk-DESYC5BB.mjs} +1 -1
  5. package/dist/{chunk-7ZHB6VE4.mjs → chunk-DJ5BLICX.mjs} +1 -1
  6. package/dist/chunk-EPPW2K6R.mjs +4 -0
  7. package/dist/{chunk-RZTXT4UD.mjs → chunk-GOMLTG5W.mjs} +1 -1
  8. package/dist/{chunk-OZ7CSBQO.mjs → chunk-ILCZ25VJ.mjs} +1 -1
  9. package/dist/{chunk-6TGQ2756.mjs → chunk-U4NCHUCT.mjs} +1 -1
  10. package/dist/chunk-YF7BU7S3.mjs +4 -0
  11. package/dist/components/Blocks/index.mjs +1 -1
  12. package/dist/components/Cards/index.mjs +1 -1
  13. package/dist/components/HeaderFooter/Header.mjs +1 -1
  14. package/dist/components/HeaderFooter/Header.stories.mjs +1 -1
  15. package/dist/components/HeaderFooter/VideoHeader.mjs +1 -1
  16. package/dist/components/HeaderFooter/index.mjs +1 -1
  17. package/dist/components/Holidays/HolidayTracker.d.ts +5 -5
  18. package/dist/components/Holidays/HolidayTracker.js +1 -1
  19. package/dist/components/Holidays/HolidayTracker.mjs +1 -1
  20. package/dist/components/Holidays/HolidayTracker.stories.js +177 -177
  21. package/dist/components/Holidays/HolidayTracker.stories.mjs +1 -1
  22. package/dist/components/Holidays/RequestLeave.d.ts +1 -3
  23. package/dist/components/Holidays/RequestLeave.js +1 -1
  24. package/dist/components/Holidays/RequestLeave.mjs +1 -1
  25. package/dist/components/Holidays/RequestLeave.stories.js +13 -13
  26. package/dist/components/Holidays/RequestLeave.stories.mjs +1 -1
  27. package/dist/components/Holidays/index.js +1 -1
  28. package/dist/components/Holidays/index.mjs +1 -1
  29. package/dist/components/Layouts/SlideShow.mjs +1 -1
  30. package/dist/components/Layouts/SlideShow.stories.mjs +1 -1
  31. package/dist/components/Layouts/index.mjs +1 -1
  32. package/dist/components/Menus/index.mjs +1 -1
  33. package/dist/components/Payload/index.mjs +1 -1
  34. package/dist/components/index.js +3 -3
  35. package/dist/components/index.mjs +1 -1
  36. package/dist/index.js +3 -3
  37. package/dist/index.mjs +1 -1
  38. package/dist/metafile-cjs.json +1 -1
  39. package/dist/metafile-esm.json +1 -1
  40. package/dist/pages/Blog.mjs +1 -1
  41. package/dist/pages/Blog.stories.mjs +1 -1
  42. package/dist/pages/Documentation.mjs +1 -1
  43. package/dist/pages/Documentation.stories.mjs +1 -1
  44. package/dist/pages/IndexPage.mjs +1 -1
  45. package/dist/pages/IndexPage.stories.mjs +1 -1
  46. package/dist/pages/Intranet.mjs +1 -1
  47. package/dist/pages/Intranet.stories.mjs +1 -1
  48. package/dist/pages/LandingPage.mjs +1 -1
  49. package/dist/pages/LandingPage.stories.mjs +1 -1
  50. package/dist/pages/Page.mjs +1 -1
  51. package/dist/pages/Page.stories.mjs +1 -1
  52. package/dist/pages/Publish.mjs +1 -1
  53. package/dist/pages/Publish.stories.mjs +1 -1
  54. package/dist/pages/Website.mjs +1 -1
  55. package/dist/pages/Website.stories.mjs +1 -1
  56. package/dist/sections/BlogListSection.mjs +1 -1
  57. package/dist/sections/BlogListSection.stories.mjs +1 -1
  58. package/dist/sections/index.mjs +1 -1
  59. package/package.json +1 -1
  60. package/dist/chunk-IK2XCY2B.mjs +0 -4
  61. package/dist/chunk-L73FONDI.mjs +0 -4
@@ -1,4 +1,4 @@
1
1
  "use client";
2
2
  "use strict";
3
3
 
4
- import{a as s}from"./chunk-4DJ6HKHR.mjs";import{a as c}from"./chunk-WU3JMLSC.mjs";import{a as u}from"./chunk-BZAYEKYC.mjs";import{b as l}from"./chunk-GLEWUUGS.mjs";import{a,b as i,c as t,e as o}from"./chunk-D76EO57Z.mjs";import{a as m}from"./chunk-RZTXT4UD.mjs";import{ExternalLink as d}from"lucide-react";import{jsx as e,jsxs as r}from"react/jsx-runtime";function b({...n}){return r("div",{className:"relative",children:[e("div",{className:"h-screen relative overflow-hidden",children:e(m,{...n.header,logoVideo:s,logoLight:u,logoDark:c})}),r("div",{id:"next-section",className:"mt-16 pt-16 min-h-screen",children:[" ",e("div",{className:"container py-8",children:r("div",{className:"grid grid-cols-1 gap-8 lg:grid-cols-3",children:[e("div",{className:"lg:col-span-2",children:n.children}),r("div",{className:"space-y-6",children:[r(a,{children:[e(i,{children:e(t,{children:"Quick Actions"})}),r(o,{children:[e("p",{className:"mb-4 text-sm text-muted-foreground",children:"Get started with your first action in just a few clicks."}),e(l,{className:"w-full",children:"Create New"})]})]}),r(a,{children:[e(i,{children:e(t,{children:"Resources"})}),e(o,{children:r("nav",{className:"flex flex-col space-y-2",children:[r("a",{href:"#",className:"inline-flex items-center text-sm text-blue-600 hover:underline",children:["User Guide",e(d,{className:"ml-1 h-3 w-3"})]}),r("a",{href:"#",className:"inline-flex items-center text-sm text-blue-600 hover:underline",children:["API Documentation",e(d,{className:"ml-1 h-3 w-3"})]}),r("a",{href:"#",className:"inline-flex items-center text-sm text-blue-600 hover:underline",children:["View Pricing Details",e(d,{className:"ml-1 h-3 w-3"})]})]})})]})]})]})})]})]})}export{b as a};
4
+ import{a as s}from"./chunk-4DJ6HKHR.mjs";import{a as c}from"./chunk-WU3JMLSC.mjs";import{a as u}from"./chunk-BZAYEKYC.mjs";import{b as l}from"./chunk-GLEWUUGS.mjs";import{a,b as i,c as t,e as o}from"./chunk-D76EO57Z.mjs";import{a as m}from"./chunk-GOMLTG5W.mjs";import{ExternalLink as d}from"lucide-react";import{jsx as e,jsxs as r}from"react/jsx-runtime";function b({...n}){return r("div",{className:"relative",children:[e("div",{className:"h-screen relative overflow-hidden",children:e(m,{...n.header,logoVideo:s,logoLight:u,logoDark:c})}),r("div",{id:"next-section",className:"mt-16 pt-16 min-h-screen",children:[" ",e("div",{className:"container py-8",children:r("div",{className:"grid grid-cols-1 gap-8 lg:grid-cols-3",children:[e("div",{className:"lg:col-span-2",children:n.children}),r("div",{className:"space-y-6",children:[r(a,{children:[e(i,{children:e(t,{children:"Quick Actions"})}),r(o,{children:[e("p",{className:"mb-4 text-sm text-muted-foreground",children:"Get started with your first action in just a few clicks."}),e(l,{className:"w-full",children:"Create New"})]})]}),r(a,{children:[e(i,{children:e(t,{children:"Resources"})}),e(o,{children:r("nav",{className:"flex flex-col space-y-2",children:[r("a",{href:"#",className:"inline-flex items-center text-sm text-blue-600 hover:underline",children:["User Guide",e(d,{className:"ml-1 h-3 w-3"})]}),r("a",{href:"#",className:"inline-flex items-center text-sm text-blue-600 hover:underline",children:["API Documentation",e(d,{className:"ml-1 h-3 w-3"})]}),r("a",{href:"#",className:"inline-flex items-center text-sm text-blue-600 hover:underline",children:["View Pricing Details",e(d,{className:"ml-1 h-3 w-3"})]})]})})]})]})]})})]})]})}export{b as a};
@@ -1,4 +1,4 @@
1
1
  "use client";
2
2
  "use strict";
3
3
 
4
- import{a as h}from"./chunk-WU3JMLSC.mjs";import{a as f}from"./chunk-BZAYEKYC.mjs";import{a as u}from"./chunk-XJIMKYBF.mjs";import{a as p}from"./chunk-4AVYTUS2.mjs";import{a as l}from"./chunk-KQLEXEOG.mjs";import{a as c}from"./chunk-CWNEDSLD.mjs";import{b as n}from"./chunk-GLEWUUGS.mjs";import{a as o,b as a,c as i,e as m}from"./chunk-D76EO57Z.mjs";import{a as s}from"./chunk-GHBJK554.mjs";import{ExternalLink as d}from"lucide-react";import{jsx as e,jsxs as t}from"react/jsx-runtime";function b({...r}){return t("div",{children:[e(s,{isMenuOpen:!0,logoLight:f,logoDark:h,...r.header}),r.hero&&r.hero.type==="lowImpact"&&e(u,{...r.hero}),r.hero&&r.hero.type==="mediumImpact"&&e(p,{...r.hero}),r.hero&&r.hero.type==="highImpact"&&e(l,{...r.hero}),r.hero&&r.hero.type==="postHero"&&e(c,{...r.hero}),e("div",{className:"container py-8",children:t("div",{className:"grid grid-cols-1 gap-8 lg:grid-cols-3",children:[e("div",{className:"lg:col-span-2",children:r.children}),t("div",{className:"space-y-6",children:[t(o,{children:[e(a,{children:e(i,{children:"Quick Actions"})}),t(m,{children:[e("p",{className:"mb-4 text-sm text-muted-foreground",children:"Get started with your first action in just a few clicks."}),e(n,{className:"w-full",children:"Create New"})]})]}),t(o,{children:[e(a,{children:e(i,{children:"Resources"})}),e(m,{children:t("nav",{className:"flex flex-col space-y-2",children:[t("a",{href:"#",className:"inline-flex items-center text-sm text-blue-600 hover:underline",children:["User Guide",e(d,{className:"ml-1 h-3 w-3"})]}),t("a",{href:"#",className:"inline-flex items-center text-sm text-blue-600 hover:underline",children:["API Documentation",e(d,{className:"ml-1 h-3 w-3"})]}),t("a",{href:"#",className:"inline-flex items-center text-sm text-blue-600 hover:underline",children:["View Pricing Details",e(d,{className:"ml-1 h-3 w-3"})]})]})})]})]})]})})]})}export{b as a};
4
+ import{a as h}from"./chunk-WU3JMLSC.mjs";import{a as f}from"./chunk-BZAYEKYC.mjs";import{a as u}from"./chunk-XJIMKYBF.mjs";import{a as p}from"./chunk-4AVYTUS2.mjs";import{a as l}from"./chunk-KQLEXEOG.mjs";import{a as c}from"./chunk-CWNEDSLD.mjs";import{b as n}from"./chunk-GLEWUUGS.mjs";import{a as o,b as a,c as i,e as m}from"./chunk-D76EO57Z.mjs";import{a as s}from"./chunk-DESYC5BB.mjs";import{ExternalLink as d}from"lucide-react";import{jsx as e,jsxs as t}from"react/jsx-runtime";function b({...r}){return t("div",{children:[e(s,{isMenuOpen:!0,logoLight:f,logoDark:h,...r.header}),r.hero&&r.hero.type==="lowImpact"&&e(u,{...r.hero}),r.hero&&r.hero.type==="mediumImpact"&&e(p,{...r.hero}),r.hero&&r.hero.type==="highImpact"&&e(l,{...r.hero}),r.hero&&r.hero.type==="postHero"&&e(c,{...r.hero}),e("div",{className:"container py-8",children:t("div",{className:"grid grid-cols-1 gap-8 lg:grid-cols-3",children:[e("div",{className:"lg:col-span-2",children:r.children}),t("div",{className:"space-y-6",children:[t(o,{children:[e(a,{children:e(i,{children:"Quick Actions"})}),t(m,{children:[e("p",{className:"mb-4 text-sm text-muted-foreground",children:"Get started with your first action in just a few clicks."}),e(n,{className:"w-full",children:"Create New"})]})]}),t(o,{children:[e(a,{children:e(i,{children:"Resources"})}),e(m,{children:t("nav",{className:"flex flex-col space-y-2",children:[t("a",{href:"#",className:"inline-flex items-center text-sm text-blue-600 hover:underline",children:["User Guide",e(d,{className:"ml-1 h-3 w-3"})]}),t("a",{href:"#",className:"inline-flex items-center text-sm text-blue-600 hover:underline",children:["API Documentation",e(d,{className:"ml-1 h-3 w-3"})]}),t("a",{href:"#",className:"inline-flex items-center text-sm text-blue-600 hover:underline",children:["View Pricing Details",e(d,{className:"ml-1 h-3 w-3"})]})]})})]})]})]})})]})}export{b as a};
@@ -1 +1 @@
1
- import{a as f}from"./chunk-WU3JMLSC.mjs";import{a as l}from"./chunk-BZAYEKYC.mjs";import{a}from"./chunk-6D7LTGTN.mjs";import{b as r}from"./chunk-Y5LJ6MWY.mjs";import{a as n}from"./chunk-FF5RGGCG.mjs";import{a as i}from"./chunk-GHBJK554.mjs";import{a as o}from"./chunk-6K2R3OAD.mjs";import{jsx as t,jsxs as p}from"react/jsx-runtime";function g({...e}){let s=e.page,{contentWithIds:c,tableOfContents:m}=o(s);return p("div",{className:"flex fixed flex-col w-screen h-screen max-h-screen overflow-auto overscroll-contain",children:[t(i,{isMenuOpen:!0,logoLight:l,logoDark:f}),t(r,{...e.hero}),t(a,{edit:e.edit,pageId:e.page.id,tableOfContents:m,relatedContent:e.relatedContent,children:t(n,{blocks:c})})]})}export{g as a};
1
+ import{a as f}from"./chunk-WU3JMLSC.mjs";import{a as l}from"./chunk-BZAYEKYC.mjs";import{a}from"./chunk-6D7LTGTN.mjs";import{b as r}from"./chunk-Y5LJ6MWY.mjs";import{a as n}from"./chunk-FF5RGGCG.mjs";import{a as i}from"./chunk-DESYC5BB.mjs";import{a as o}from"./chunk-6K2R3OAD.mjs";import{jsx as t,jsxs as p}from"react/jsx-runtime";function g({...e}){let s=e.page,{contentWithIds:c,tableOfContents:m}=o(s);return p("div",{className:"flex fixed flex-col w-screen h-screen max-h-screen overflow-auto overscroll-contain",children:[t(i,{isMenuOpen:!0,logoLight:l,logoDark:f}),t(r,{...e.hero}),t(a,{edit:e.edit,pageId:e.page.id,tableOfContents:m,relatedContent:e.relatedContent,children:t(n,{blocks:c})})]})}export{g as a};
@@ -1 +1 @@
1
- import{a as i}from"./chunk-3TIFSACL.mjs";import{a as m}from"./chunk-XDP6BKTK.mjs";import{a as t}from"./chunk-NIQ4466A.mjs";import{jsx as p,jsxs as s}from"react/jsx-runtime";function l({isMenuOpen:e,logoLight:o,logoDark:r,menuItems:a,className:n}){return s("div",{className:t("fixed top-0 left-0 right-0 z-50",n),children:[p(i,{isMenuOpen:e,logoLight:o,logoDark:r,menuItems:a}),p(m,{isMenuOpen:e,logoLight:o,logoDark:r,menuItems:a})]})}export{l as a};
1
+ import{a as m}from"./chunk-XDP6BKTK.mjs";import{a as i}from"./chunk-3TIFSACL.mjs";import{a as t}from"./chunk-NIQ4466A.mjs";import{jsx as p,jsxs as s}from"react/jsx-runtime";function l({isMenuOpen:e,logoLight:o,logoDark:r,menuItems:a,className:n}){return s("div",{className:t("fixed top-0 left-0 right-0 z-50",n),children:[p(i,{isMenuOpen:e,logoLight:o,logoDark:r,menuItems:a}),p(m,{isMenuOpen:e,logoLight:o,logoDark:r,menuItems:a})]})}export{l as a};
@@ -1,4 +1,4 @@
1
1
  "use client";
2
2
  "use strict";
3
3
 
4
- import{a as g}from"./chunk-WU3JMLSC.mjs";import{a as h}from"./chunk-BZAYEKYC.mjs";import{a as S}from"./chunk-QL74DMZ3.mjs";import{a as p}from"./chunk-4VDJWCUB.mjs";import{a as o,b as d,c as i,d as t,e as m,f as l}from"./chunk-AWFQEK7A.mjs";import{a as c}from"./chunk-3YZN4MJB.mjs";import{b as s,d as b,f as u}from"./chunk-AFA6LBJ4.mjs";import{a as n}from"./chunk-Y5VTKEKS.mjs";import{a as f}from"./chunk-GHBJK554.mjs";import{jsx as e,jsxs as r}from"react/jsx-runtime";function v({...a}){return r("div",{className:"bg-sidebar",children:[e(f,{isMenuOpen:!0,logoLight:h,logoDark:g,...a.header,className:"bg-sidebar"}),r(s,{className:"top-24 mb-4 h-full max-h-[calc(100vh-3.5rem)] flex-1 flex-row overflow-y-clip",children:[e(p,{...a.sidebarLeft,className:"flex-none top-24"}),r(u,{className:"grow overflow-hidden",children:[e("header",{className:"flex h-16 shrink-0 items-center gap-2",children:r("div",{className:"flex items-center gap-2 px-4",children:[e(b,{className:"-ml-1"}),e(n,{orientation:"vertical",className:"mr-2 h-4"}),e(o,{children:r(d,{children:[e(i,{className:"hidden md:block",children:e(t,{href:"#",children:"Building Your Application"})}),e(l,{className:"hidden md:block"}),e(i,{children:e(m,{children:"Data Fetching"})})]})})]})}),r("div",{className:"flex flex-1 flex-col gap-4 p-4 pt-0",children:[r("div",{className:"grid auto-rows-min gap-4 md:grid-cols-3",children:[e("div",{className:"aspect-video rounded-xl bg-muted/50"}),e("div",{className:"aspect-video rounded-xl bg-muted/50"}),e("div",{className:"aspect-video rounded-xl bg-muted/50"})]}),e("div",{className:"flex-1 rounded-xl bg-muted/50 md:min-h-min"})]})]}),e(S,{...a.sidebarRight,className:"flex-none top-24"})]}),e(c,{})]})}export{v as a};
4
+ import{a as g}from"./chunk-WU3JMLSC.mjs";import{a as h}from"./chunk-BZAYEKYC.mjs";import{a as S}from"./chunk-QL74DMZ3.mjs";import{a as p}from"./chunk-4VDJWCUB.mjs";import{a as o,b as d,c as i,d as t,e as m,f as l}from"./chunk-AWFQEK7A.mjs";import{a as c}from"./chunk-3YZN4MJB.mjs";import{b as s,d as b,f as u}from"./chunk-AFA6LBJ4.mjs";import{a as n}from"./chunk-Y5VTKEKS.mjs";import{a as f}from"./chunk-DESYC5BB.mjs";import{jsx as e,jsxs as r}from"react/jsx-runtime";function v({...a}){return r("div",{className:"bg-sidebar",children:[e(f,{isMenuOpen:!0,logoLight:h,logoDark:g,...a.header,className:"bg-sidebar"}),r(s,{className:"top-24 mb-4 h-full max-h-[calc(100vh-3.5rem)] flex-1 flex-row overflow-y-clip",children:[e(p,{...a.sidebarLeft,className:"flex-none top-24"}),r(u,{className:"grow overflow-hidden",children:[e("header",{className:"flex h-16 shrink-0 items-center gap-2",children:r("div",{className:"flex items-center gap-2 px-4",children:[e(b,{className:"-ml-1"}),e(n,{orientation:"vertical",className:"mr-2 h-4"}),e(o,{children:r(d,{children:[e(i,{className:"hidden md:block",children:e(t,{href:"#",children:"Building Your Application"})}),e(l,{className:"hidden md:block"}),e(i,{children:e(m,{children:"Data Fetching"})})]})})]})}),r("div",{className:"flex flex-1 flex-col gap-4 p-4 pt-0",children:[r("div",{className:"grid auto-rows-min gap-4 md:grid-cols-3",children:[e("div",{className:"aspect-video rounded-xl bg-muted/50"}),e("div",{className:"aspect-video rounded-xl bg-muted/50"}),e("div",{className:"aspect-video rounded-xl bg-muted/50"})]}),e("div",{className:"flex-1 rounded-xl bg-muted/50 md:min-h-min"})]})]}),e(S,{...a.sidebarRight,className:"flex-none top-24"})]}),e(c,{})]})}export{v as a};
@@ -0,0 +1,4 @@
1
+ "use client";
2
+ "use strict";
3
+
4
+ import{a as p}from"./chunk-YF7BU7S3.mjs";import{a as u}from"./chunk-BXBLKTRB.mjs";import{a as v}from"./chunk-ZGOBG76E.mjs";import{a as g}from"./chunk-RMI4G7HJ.mjs";import{useState as w}from"react";import{ChevronDown as L}from"lucide-react";import{CalendarDays as N,Grid as C,PlusCircle as q,CheckSquare as R}from"lucide-react";import{useRouter as k}from"next/navigation";import{format as A}from"date-fns";import{jsx as r,jsxs as o}from"react/jsx-runtime";function y(...n){return n.filter(Boolean).join(" ")}function F({holidays:n,currentUser:t,currentDate:s,leaveApprovals:f,employees:b,submitLeaveRequest:i}){let[a,d]=w("Calendar View"),D=k(),h=!1,m=async e=>{console.log("Setting current date:",e);let x=A(e,"dd-MM-yyyy"),c=new URL(window.location.href);return c.searchParams.set("date",x),D.push(c.toString()),{success:!0}};if(h)return r("div",{className:"flex justify-center items-center h-screen",children:r("div",{className:"animate-spin rounded-full h-32 w-32 border-t-2 border-b-2 border-gray-900"})});let l=[{name:"Grid View",icon:C,current:a==="Grid View"},{name:"Calendar View",icon:N,current:a==="Calendar View"},{name:"Request Leave",icon:q,current:a==="Request Leave"},{name:"Approve Leave",icon:R,current:a==="Approve Leave"}];return o("div",{className:"container mx-auto p-4",children:[r("h1",{className:"text-3xl font-bold mb-4",children:"Holiday Tracker"}),o("div",{className:"mb-8",children:[o("div",{className:"sm:hidden",children:[r("select",{value:a,onChange:e=>d(e.target.value),className:"block w-full rounded-md border-gray-300 py-2 pl-3 pr-10 text-base focus:border-indigo-500 focus:outline-none focus:ring-indigo-500 sm:text-sm",children:l.map(e=>r("option",{children:e.name},e.name))}),r(L,{className:"pointer-events-none absolute right-3 top-3 h-5 w-5 text-gray-400","aria-hidden":"true"})]}),r("div",{className:"hidden sm:block",children:r("div",{className:"border-b border-gray-200",children:r("nav",{className:"-mb-px flex space-x-8","aria-label":"Tabs",children:l.map(e=>o("a",{onClick:()=>{(e.name!=="Approve Leave"||t.grade==="Manager"||t.grade==="Senior Manager"||t.grade==="Partner")&&d(e.name)},className:y(e.current?"border-accent text-accent":"border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700",e.name==="Approve Leave"&&t.grade!=="Manager"&&t.grade!=="Senior Manager"&&t.grade!=="Partner"?"cursor-not-allowed opacity-50":"","group inline-flex items-center border-b-2 py-4 px-1 text-sm font-medium"),"aria-current":e.current?"page":void 0,children:[r(e.icon,{className:y(e.current?"text-accent":"text-gray-400 group-hover:text-gray-500","-ml-0.5 mr-2 h-5 w-5"),"aria-hidden":"true"}),r("span",{children:e.name})]},e.name))})})})]}),a==="Grid View"&&r(g,{currentDate:s,setCurrentDate:m,holidays:n,employees:b}),a==="Calendar View"&&r(v,{currentDate:s,setCurrentDate:m,holidays:n}),a==="Request Leave"&&r(p,{remainingDays:t.remainingLeaveDays,submitLeaveRequest:e=>i?i(e):Promise.resolve({success:!1,message:"Submit leave request function not provided"})}),a==="Approve Leave"&&r(u,{leaveRequests:f,onApprove:()=>{},onReject:()=>{}})]})}export{F as a};
@@ -1,4 +1,4 @@
1
1
  "use client";
2
2
  "use strict";
3
3
 
4
- import{a as u}from"./chunk-3TIFSACL.mjs";import{a as v}from"./chunk-XDP6BKTK.mjs";import{a as m}from"./chunk-NIQ4466A.mjs";import{useState as f,useEffect as b}from"react";import{Menu as x,ChevronDown as w}from"lucide-react";import N from"next/image";import{jsx as e,jsxs as t}from"react/jsx-runtime";function O({logoVideo:p,logoLight:s,logoDark:i,menuItems:a,title:r,subtitle:n}){let[c,d]=f(!1),[l,g]=f(!1),h=()=>{let o=document.getElementById("next-section");o&&o.scrollIntoView({behavior:"smooth"})};return b(()=>{let o=()=>{window.scrollY>100?d(!0):d(!1)};return window.addEventListener("scroll",o,{passive:!0}),()=>window.removeEventListener("scroll",o)},[]),t("div",{className:"relative h-screen",children:[t("div",{className:"absolute inset-0 w-full h-screen overflow-hidden",children:[t("video",{className:"object-cover w-full h-full",autoPlay:!0,loop:!0,muted:!0,playsInline:!0,children:[e("source",{src:"assets/videos/background.mov",type:"video/mp4"}),"Your browser does not support the video tag."]}),e("div",{className:"absolute inset-0 bg-primary-900/50"})]}),!c&&!l&&e("button",{className:"fixed hidden lg:block top-4 right-4 z-[60] p-2 rounded-full bg-white/10 backdrop-blur-sm transition-all duration-300 hover:bg-white/20",onClick:()=>{g(!l)},children:e(x,{className:"w-6 h-6 text-white"})}),t("div",{className:"fixed top-0 left-0 right-0 z-50",children:[e(u,{isMenuOpen:c||l,logoLight:s,logoDark:i,menuItems:a}),e(v,{isMenuOpen:!0,logoLight:s,logoDark:i,menuItems:a})]}),t("div",{className:"absolute inset-0 h-full z-10 flex flex-col items-center justify-between text-white text-center px-4",children:[e(N,{src:p,alt:"Cortex Reply Logo",width:720,height:320,className:m("absolute top-2.5 h-auto w-auto mt-8 hidden lg:block",l&&"lg:hidden")}),t("div",{className:"absolute top-1/2vv h-full flex flex-col px-4 items-center justify-center",children:[e("h1",{className:"text-6xl font-bold pt-auto mb-12",children:r&&r}),e("div",{className:"text-3xl mb-8 max-w-2xl",children:n&&n})]}),e("div",{className:"absolute bottom-10 flex justify-center items-center w-full mb-8",children:e("div",{className:"animate-bounce cursor-pointer hover:text-accent",onClick:h,children:e(w,{size:64})})})]})]})}export{O as a};
4
+ import{a as v}from"./chunk-XDP6BKTK.mjs";import{a as u}from"./chunk-3TIFSACL.mjs";import{a as m}from"./chunk-NIQ4466A.mjs";import{useState as f,useEffect as b}from"react";import{Menu as x,ChevronDown as w}from"lucide-react";import N from"next/image";import{jsx as e,jsxs as t}from"react/jsx-runtime";function O({logoVideo:p,logoLight:s,logoDark:i,menuItems:a,title:r,subtitle:n}){let[c,d]=f(!1),[l,g]=f(!1),h=()=>{let o=document.getElementById("next-section");o&&o.scrollIntoView({behavior:"smooth"})};return b(()=>{let o=()=>{window.scrollY>100?d(!0):d(!1)};return window.addEventListener("scroll",o,{passive:!0}),()=>window.removeEventListener("scroll",o)},[]),t("div",{className:"relative h-screen",children:[t("div",{className:"absolute inset-0 w-full h-screen overflow-hidden",children:[t("video",{className:"object-cover w-full h-full",autoPlay:!0,loop:!0,muted:!0,playsInline:!0,children:[e("source",{src:"assets/videos/background.mov",type:"video/mp4"}),"Your browser does not support the video tag."]}),e("div",{className:"absolute inset-0 bg-primary-900/50"})]}),!c&&!l&&e("button",{className:"fixed hidden lg:block top-4 right-4 z-[60] p-2 rounded-full bg-white/10 backdrop-blur-sm transition-all duration-300 hover:bg-white/20",onClick:()=>{g(!l)},children:e(x,{className:"w-6 h-6 text-white"})}),t("div",{className:"fixed top-0 left-0 right-0 z-50",children:[e(u,{isMenuOpen:c||l,logoLight:s,logoDark:i,menuItems:a}),e(v,{isMenuOpen:!0,logoLight:s,logoDark:i,menuItems:a})]}),t("div",{className:"absolute inset-0 h-full z-10 flex flex-col items-center justify-between text-white text-center px-4",children:[e(N,{src:p,alt:"Cortex Reply Logo",width:720,height:320,className:m("absolute top-2.5 h-auto w-auto mt-8 hidden lg:block",l&&"lg:hidden")}),t("div",{className:"absolute top-1/2vv h-full flex flex-col px-4 items-center justify-center",children:[e("h1",{className:"text-6xl font-bold pt-auto mb-12",children:r&&r}),e("div",{className:"text-3xl mb-8 max-w-2xl",children:n&&n})]}),e("div",{className:"absolute bottom-10 flex justify-center items-center w-full mb-8",children:e("div",{className:"animate-bounce cursor-pointer hover:text-accent",onClick:h,children:e(w,{size:64})})})]})]})}export{O as a};
@@ -1 +1 @@
1
- import{a}from"./chunk-WU3JMLSC.mjs";import{a as m}from"./chunk-BZAYEKYC.mjs";import{a as i}from"./chunk-R75QPTHT.mjs";import{a as o}from"./chunk-CWNEDSLD.mjs";import{a as t}from"./chunk-GHBJK554.mjs";import{jsx as r,jsxs as n}from"react/jsx-runtime";function d({...e}){return n("div",{children:[r(t,{isMenuOpen:!0,logoLight:m,logoDark:a}),r(o,{...e.hero}),r(i,{className:"!pb-0",...e.blog})]})}export{d as a};
1
+ import{a}from"./chunk-WU3JMLSC.mjs";import{a as m}from"./chunk-BZAYEKYC.mjs";import{a as i}from"./chunk-R75QPTHT.mjs";import{a as o}from"./chunk-CWNEDSLD.mjs";import{a as t}from"./chunk-DESYC5BB.mjs";import{jsx as r,jsxs as n}from"react/jsx-runtime";function d({...e}){return n("div",{children:[r(t,{isMenuOpen:!0,logoLight:m,logoDark:a}),r(o,{...e.hero}),r(i,{className:"!pb-0",...e.blog})]})}export{d as a};
@@ -1 +1 @@
1
- import{a as g}from"./chunk-AD7PG4E2.mjs";import{a as e}from"./chunk-WZLEEZ5C.mjs";import{a as n}from"./chunk-6ZNVXWZR.mjs";import{a as o}from"./chunk-65EMMROH.mjs";import{a as s}from"./chunk-UESKYRNK.mjs";import{jsx as i,jsxs as a}from"react/jsx-runtime";function f({blogs:l,pages:m,categories:t,types:r}){return i("section",{children:i(s,{children:a("div",{className:"grid gap-30px lg:grid-cols-[1fr_410px]",children:[a("div",{children:[r&&i(n,{types:r}),i(g,{blogs:l}),i(e,{pages:m})]}),i("div",{className:"grid gap-30px w-full self-baseline max-md:mx-auto max-md:max-w-[410px] lg:gap-10",children:i("div",{className:"lg:-mt-24 w-full",children:t&&t.links&&i(o,{links:t.links,title:t.title})})})]})})})}export{f as a};
1
+ import{a as g}from"./chunk-AD7PG4E2.mjs";import{a as n}from"./chunk-6ZNVXWZR.mjs";import{a as e}from"./chunk-WZLEEZ5C.mjs";import{a as o}from"./chunk-65EMMROH.mjs";import{a as s}from"./chunk-UESKYRNK.mjs";import{jsx as i,jsxs as a}from"react/jsx-runtime";function f({blogs:l,pages:m,categories:t,types:r}){return i("section",{children:i(s,{children:a("div",{className:"grid gap-30px lg:grid-cols-[1fr_410px]",children:[a("div",{children:[r&&i(n,{types:r}),i(g,{blogs:l}),i(e,{pages:m})]}),i("div",{className:"grid gap-30px w-full self-baseline max-md:mx-auto max-md:max-w-[410px] lg:gap-10",children:i("div",{className:"lg:-mt-24 w-full",children:t&&t.links&&i(o,{links:t.links,title:t.title})})})]})})})}export{f as a};
@@ -0,0 +1,4 @@
1
+ "use client";
2
+ "use strict";
3
+
4
+ import{a as D,b as P,d as x}from"./chunk-HWEPDRG6.mjs";import{a as d}from"./chunk-DWRQHV42.mjs";import{a as N}from"./chunk-XGQLOPHW.mjs";import{b as c}from"./chunk-GLEWUUGS.mjs";import{a as h}from"./chunk-NIQ4466A.mjs";import{useState as f,useEffect as R}from"react";import{format as L}from"date-fns";import{CalendarIcon as S}from"lucide-react";import{useRouter as w}from"next/navigation";import{Toaster as q,toast as p}from"sonner";import{jsx as e,jsxs as s}from"react/jsx-runtime";var B=({options:r,value:n,onChange:a,disabled:i=[]})=>e("div",{className:"flex space-x-2",children:r.map((t,l)=>e(c,{type:"button",variant:n===t?"default":"outline",onClick:()=>a(t),disabled:i[l],className:"flex-1 hover:bg-accent hover:text-accent-foreground",children:t},t))});function J({remainingDays:r,submitLeaveRequest:n}){let[a,i]=f(void 0),[t,l]=f(void 0),[m,v]=f("Full Day"),[g,C]=f(!1),F=w();R(()=>{C(a!==t||!a||!t),g&&v("Full Day")},[a,t]);let T=o=>{v(o)};return s("div",{className:"max-w-2xl",children:[e("h2",{className:"text-lg font-semibold mb-4",children:"Request Leave"}),s("p",{className:"text-sm text-gray-500 mb-4",children:["Remaining leave days: ",r]}),s("form",{onSubmit:async o=>{if(o.preventDefault(),!a||!t){p.error("Please select both start and end dates");return}let y=Math.ceil((t.getTime()-a.getTime())/(1e3*60*60*24))+1;if((m==="Morning"||m==="Afternoon")&&(y=.5),y>r){p.error("You do not have enough leave days remaining");return}let u=new FormData;u.append("startDate",a.toISOString()),u.append("endDate",t.toISOString()),u.append("leaveType",m),u.append("duration",y.toString());let b=await(n||E)(u);b.success?(p.success(b.message),i(void 0),l(void 0),v("Full Day"),F.refresh()):p.error(`Error: ${b.message}`)},className:"space-y-4",children:[s("div",{className:"grid grid-cols-2 gap-4",children:[s("div",{className:"flex flex-col space-y-2",children:[e(d,{htmlFor:"startDate",children:"Start Date"}),s(D,{children:[e(P,{asChild:!0,children:s(c,{variant:"outline",className:h("w-full justify-start text-left font-normal",!a&&"text-muted-foreground"),children:[e(S,{className:"mr-2 h-4 w-4"}),a?L(a,"PPP"):e("span",{children:"Pick a date"})]})}),e(x,{className:"w-auto p-0",align:"start",children:e(N,{mode:"single",selected:a,onSelect:o=>{i(o),o&&(!t||o>t)&&l(o)},initialFocus:!0})})]})]}),s("div",{className:"flex flex-col space-y-2",children:[e(d,{htmlFor:"endDate",children:"End Date"}),s(D,{children:[e(P,{asChild:!0,children:s(c,{variant:"outline",className:h("w-full justify-start text-left font-normal",!t&&"text-muted-foreground"),children:[e(S,{className:"mr-2 h-4 w-4"}),t?L(t,"PPP"):e("span",{children:"Pick a date"})]})}),e(x,{className:"w-auto p-0",align:"start",children:e(N,{mode:"single",selected:t,onSelect:l,disabled:o=>a?o<a:!1,initialFocus:!0})})]})]})]}),s("div",{className:"space-y-2",children:[e(d,{children:"Leave Type"}),e(B,{options:["Full Day","Morning","Afternoon"],value:m,onChange:T,disabled:[!1,g,g]})]}),e(c,{type:"submit",className:"w-full hover:bg-accent hover:text-accent-foreground",children:"Submit Request"})]}),e(q,{richColors:!0,position:"top-right",closeButton:!0,visibleToasts:9})]})}var E=async r=>{let n={};return r.forEach((a,i)=>{n[i]=a}),console.log("Leave request submitted:",n),{success:!0,message:`Leave request submitted successfully for ${r.get("duration")}`}};export{J as a};
@@ -1 +1 @@
1
- import{a as e}from"../../chunk-6HFYLEVF.mjs";import{a as q}from"../../chunk-PC3JJLM4.mjs";import"../../chunk-423OEU3K.mjs";import{a as f}from"../../chunk-EPTHSTUM.mjs";import{a}from"../../chunk-UZ2XYB7D.mjs";import{a as d}from"../../chunk-53QLSQCO.mjs";import{a as n}from"../../chunk-JCH2CCQ7.mjs";import{a as o}from"../../chunk-HUN2X4VH.mjs";import"../../chunk-2LJVMEWU.mjs";import"../../chunk-KPIWBWE2.mjs";import"../../chunk-6P7CY367.mjs";import{a as p}from"../../chunk-FF5RGGCG.mjs";import{a as m}from"../../chunk-F3X4XMDX.mjs";import{a as b}from"../../chunk-H7D3PZKE.mjs";import{a as c}from"../../chunk-IQPZEEYJ.mjs";import{a as g,b as h,c as l}from"../../chunk-OCZTJKMQ.mjs";import"../../chunk-O5BAW5XQ.mjs";import"../../chunk-NWW7KWJK.mjs";import{a as k}from"../../chunk-UK4IPFAO.mjs";import"../../chunk-ICTOXY7D.mjs";import"../../chunk-YNDKGRL6.mjs";import"../../chunk-TFWGOEV7.mjs";import{a as j}from"../../chunk-763KMQIQ.mjs";import"../../chunk-J2VQUYES.mjs";import{a as i}from"../../chunk-SJWGFZJ6.mjs";import"../../chunk-44TDI42O.mjs";import"../../chunk-BOPZHZ27.mjs";import"../../chunk-Q6SEVCRG.mjs";import"../../chunk-GLEWUUGS.mjs";import"../../chunk-D76EO57Z.mjs";import"../../chunk-SFLOMJ2U.mjs";import"../../chunk-NIQ4466A.mjs";import"../../chunk-6K2R3OAD.mjs";import"../../chunk-S7OK7D5I.mjs";export{g as BannerBlock,h as CallToActionBlock,j as CodeBlock,m as ContentBlock,i as CopyButton,l as FeaturesBlock,n as HeadingImage,o as ImageBlock,b as InfoTile,a as Insight,c as MOTD,k as MediaBlock,d as OrgChart,e as ProposalSummary,q as RelatedPosts,p as RenderBlocks,f as WhyUs};
1
+ import{a as d}from"../../chunk-53QLSQCO.mjs";import{a as e}from"../../chunk-6HFYLEVF.mjs";import{a as q}from"../../chunk-PC3JJLM4.mjs";import"../../chunk-423OEU3K.mjs";import{a as f}from"../../chunk-EPTHSTUM.mjs";import{a as o}from"../../chunk-HUN2X4VH.mjs";import{a}from"../../chunk-UZ2XYB7D.mjs";import"../../chunk-KPIWBWE2.mjs";import{a as n}from"../../chunk-JCH2CCQ7.mjs";import"../../chunk-6P7CY367.mjs";import"../../chunk-2LJVMEWU.mjs";import{a as p}from"../../chunk-FF5RGGCG.mjs";import{a as m}from"../../chunk-F3X4XMDX.mjs";import{a as b}from"../../chunk-H7D3PZKE.mjs";import{a as c}from"../../chunk-IQPZEEYJ.mjs";import{a as g,b as h,c as l}from"../../chunk-OCZTJKMQ.mjs";import"../../chunk-O5BAW5XQ.mjs";import"../../chunk-NWW7KWJK.mjs";import{a as k}from"../../chunk-UK4IPFAO.mjs";import"../../chunk-ICTOXY7D.mjs";import"../../chunk-YNDKGRL6.mjs";import"../../chunk-TFWGOEV7.mjs";import{a as j}from"../../chunk-763KMQIQ.mjs";import"../../chunk-J2VQUYES.mjs";import{a as i}from"../../chunk-SJWGFZJ6.mjs";import"../../chunk-44TDI42O.mjs";import"../../chunk-BOPZHZ27.mjs";import"../../chunk-Q6SEVCRG.mjs";import"../../chunk-GLEWUUGS.mjs";import"../../chunk-D76EO57Z.mjs";import"../../chunk-SFLOMJ2U.mjs";import"../../chunk-NIQ4466A.mjs";import"../../chunk-6K2R3OAD.mjs";import"../../chunk-S7OK7D5I.mjs";export{g as BannerBlock,h as CallToActionBlock,j as CodeBlock,m as ContentBlock,i as CopyButton,l as FeaturesBlock,n as HeadingImage,o as ImageBlock,b as InfoTile,a as Insight,c as MOTD,k as MediaBlock,d as OrgChart,e as ProposalSummary,q as RelatedPosts,p as RenderBlocks,f as WhyUs};
@@ -1 +1 @@
1
- import{a as e}from"../../chunk-P5NVJTJ5.mjs";import{a as d}from"../../chunk-FGWIT6CV.mjs";import{a}from"../../chunk-ZWKWU7U4.mjs";import{a as g}from"../../chunk-66ZAIUUI.mjs";import{a as f}from"../../chunk-TQCGX4Y6.mjs";import{a as b}from"../../chunk-VZXLXNVY.mjs";import{a as c}from"../../chunk-Y2KKUQDU.mjs";import"../../chunk-JWDVKGZL.mjs";import"../../chunk-SBM5HULF.mjs";import"../../chunk-Q6SEVCRG.mjs";import"../../chunk-GLEWUUGS.mjs";import"../../chunk-D76EO57Z.mjs";import"../../chunk-WISCWNL2.mjs";import"../../chunk-SFLOMJ2U.mjs";import"../../chunk-NIQ4466A.mjs";import"../../chunk-6K2R3OAD.mjs";import"../../chunk-S7OK7D5I.mjs";export{b as CustomerCard,c as EventCard,a as FeatureCard,e as Image,g as PricingCard,d as ProjectCard,f as ServiceCard};
1
+ import{a as d}from"../../chunk-FGWIT6CV.mjs";import{a}from"../../chunk-ZWKWU7U4.mjs";import{a as e}from"../../chunk-P5NVJTJ5.mjs";import{a as g}from"../../chunk-66ZAIUUI.mjs";import{a as f}from"../../chunk-TQCGX4Y6.mjs";import{a as b}from"../../chunk-VZXLXNVY.mjs";import{a as c}from"../../chunk-Y2KKUQDU.mjs";import"../../chunk-JWDVKGZL.mjs";import"../../chunk-SBM5HULF.mjs";import"../../chunk-Q6SEVCRG.mjs";import"../../chunk-GLEWUUGS.mjs";import"../../chunk-D76EO57Z.mjs";import"../../chunk-WISCWNL2.mjs";import"../../chunk-SFLOMJ2U.mjs";import"../../chunk-NIQ4466A.mjs";import"../../chunk-6K2R3OAD.mjs";import"../../chunk-S7OK7D5I.mjs";export{b as CustomerCard,c as EventCard,a as FeatureCard,e as Image,g as PricingCard,d as ProjectCard,f as ServiceCard};
@@ -1 +1 @@
1
- import{a}from"../../chunk-GHBJK554.mjs";import"../../chunk-3TIFSACL.mjs";import"../../chunk-SV3TTIPR.mjs";import"../../chunk-XDP6BKTK.mjs";import"../../chunk-HAYRX2WO.mjs";import"../../chunk-WISCWNL2.mjs";import"../../chunk-SFLOMJ2U.mjs";import"../../chunk-UESKYRNK.mjs";import"../../chunk-NIQ4466A.mjs";import"../../chunk-6K2R3OAD.mjs";import"../../chunk-S7OK7D5I.mjs";export{a as Header};
1
+ import{a}from"../../chunk-DESYC5BB.mjs";import"../../chunk-XDP6BKTK.mjs";import"../../chunk-3TIFSACL.mjs";import"../../chunk-SV3TTIPR.mjs";import"../../chunk-HAYRX2WO.mjs";import"../../chunk-WISCWNL2.mjs";import"../../chunk-SFLOMJ2U.mjs";import"../../chunk-UESKYRNK.mjs";import"../../chunk-NIQ4466A.mjs";import"../../chunk-6K2R3OAD.mjs";import"../../chunk-S7OK7D5I.mjs";export{a as Header};
@@ -1 +1 @@
1
- import{a as t}from"../../chunk-WU3JMLSC.mjs";import{a as n}from"../../chunk-BZAYEKYC.mjs";import{a as o}from"../../chunk-X5KZKO2V.mjs";import{a as e}from"../../chunk-GHBJK554.mjs";import"../../chunk-3TIFSACL.mjs";import"../../chunk-SV3TTIPR.mjs";import"../../chunk-XDP6BKTK.mjs";import"../../chunk-HAYRX2WO.mjs";import"../../chunk-WISCWNL2.mjs";import"../../chunk-SFLOMJ2U.mjs";import"../../chunk-UESKYRNK.mjs";import"../../chunk-NIQ4466A.mjs";import"../../chunk-6K2R3OAD.mjs";import"../../chunk-S7OK7D5I.mjs";import{jsx as r}from"react/jsx-runtime";var p={title:"Header/Header",component:e,decorators:[i=>r(o,{attribute:"class",defaultTheme:"dark",enableSystem:!0,disableTransitionOnChange:!0,children:r(i,{})})]},d={args:{isMenuOpen:!0,logoDark:t,logoLight:n,menuItems:[{name:"Product",items:[{name:"Analytics",description:"Understand your traffic",href:"#",icon:{type:"thin",iconName:"cloud"}},{name:"Engagement",description:"Interact with customers",href:"#",icon:{type:"thin",iconName:"cloud"}},{name:"Security",description:"Protect your data",href:"#",icon:{type:"thin",iconName:"cloud"}}]},{name:"Resources",items:[{name:"Documentation",href:"#",icon:{type:"thin",iconName:"cloud"}},{name:"API Reference",href:"#",icon:{type:"thin",iconName:"cloud"}},{name:"Github",href:"#",icon:{type:"brands",iconName:"github"}}],actions:[{name:"Watch demo",href:"#",icon:{type:"thin",iconName:"cloud"}},{name:"Contact sales",href:"#",icon:{type:"thin",iconName:"cloud"}},{name:"View all products",href:"#",icon:{type:"thin",iconName:"cloud"}}]},{name:"Company",href:"#"}]}};export{d as Primary,p as default};
1
+ import{a as t}from"../../chunk-WU3JMLSC.mjs";import{a as n}from"../../chunk-BZAYEKYC.mjs";import{a as o}from"../../chunk-X5KZKO2V.mjs";import{a as e}from"../../chunk-DESYC5BB.mjs";import"../../chunk-XDP6BKTK.mjs";import"../../chunk-3TIFSACL.mjs";import"../../chunk-SV3TTIPR.mjs";import"../../chunk-HAYRX2WO.mjs";import"../../chunk-WISCWNL2.mjs";import"../../chunk-SFLOMJ2U.mjs";import"../../chunk-UESKYRNK.mjs";import"../../chunk-NIQ4466A.mjs";import"../../chunk-6K2R3OAD.mjs";import"../../chunk-S7OK7D5I.mjs";import{jsx as r}from"react/jsx-runtime";var p={title:"Header/Header",component:e,decorators:[i=>r(o,{attribute:"class",defaultTheme:"dark",enableSystem:!0,disableTransitionOnChange:!0,children:r(i,{})})]},d={args:{isMenuOpen:!0,logoDark:t,logoLight:n,menuItems:[{name:"Product",items:[{name:"Analytics",description:"Understand your traffic",href:"#",icon:{type:"thin",iconName:"cloud"}},{name:"Engagement",description:"Interact with customers",href:"#",icon:{type:"thin",iconName:"cloud"}},{name:"Security",description:"Protect your data",href:"#",icon:{type:"thin",iconName:"cloud"}}]},{name:"Resources",items:[{name:"Documentation",href:"#",icon:{type:"thin",iconName:"cloud"}},{name:"API Reference",href:"#",icon:{type:"thin",iconName:"cloud"}},{name:"Github",href:"#",icon:{type:"brands",iconName:"github"}}],actions:[{name:"Watch demo",href:"#",icon:{type:"thin",iconName:"cloud"}},{name:"Contact sales",href:"#",icon:{type:"thin",iconName:"cloud"}},{name:"View all products",href:"#",icon:{type:"thin",iconName:"cloud"}}]},{name:"Company",href:"#"}]}};export{d as Primary,p as default};
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- "use strict";import{a}from"../../chunk-RZTXT4UD.mjs";import"../../chunk-3TIFSACL.mjs";import"../../chunk-SV3TTIPR.mjs";import"../../chunk-XDP6BKTK.mjs";import"../../chunk-HAYRX2WO.mjs";import"../../chunk-WISCWNL2.mjs";import"../../chunk-SFLOMJ2U.mjs";import"../../chunk-UESKYRNK.mjs";import"../../chunk-NIQ4466A.mjs";import"../../chunk-6K2R3OAD.mjs";import"../../chunk-S7OK7D5I.mjs";export{a as VideoHeader};
2
+ "use strict";import{a}from"../../chunk-GOMLTG5W.mjs";import"../../chunk-XDP6BKTK.mjs";import"../../chunk-3TIFSACL.mjs";import"../../chunk-SV3TTIPR.mjs";import"../../chunk-HAYRX2WO.mjs";import"../../chunk-WISCWNL2.mjs";import"../../chunk-SFLOMJ2U.mjs";import"../../chunk-UESKYRNK.mjs";import"../../chunk-NIQ4466A.mjs";import"../../chunk-6K2R3OAD.mjs";import"../../chunk-S7OK7D5I.mjs";export{a as VideoHeader};
@@ -1 +1 @@
1
- import{a}from"../../chunk-O5XLZ254.mjs";import{a as e}from"../../chunk-RZTXT4UD.mjs";import"../../chunk-ZDPQXVTF.mjs";import"../../chunk-CS77R54Z.mjs";import{a as f}from"../../chunk-23L5ZJ2U.mjs";import{a as g}from"../../chunk-GHBJK554.mjs";import{a as c}from"../../chunk-3TIFSACL.mjs";import"../../chunk-SV3TTIPR.mjs";import{a as d}from"../../chunk-XDP6BKTK.mjs";import{a as b}from"../../chunk-HAYRX2WO.mjs";import"../../chunk-WISCWNL2.mjs";import"../../chunk-YNNW2C2U.mjs";import"../../chunk-SFLOMJ2U.mjs";import"../../chunk-UESKYRNK.mjs";import"../../chunk-NIQ4466A.mjs";import"../../chunk-6K2R3OAD.mjs";import"../../chunk-S7OK7D5I.mjs";export{b as BrandLogo,f as Footer,g as Header,c as HeaderDesktop,d as HeaderMobile,a as SimpleHeader,e as VideoHeader};
1
+ import{a as e}from"../../chunk-GOMLTG5W.mjs";import"../../chunk-ZDPQXVTF.mjs";import{a}from"../../chunk-O5XLZ254.mjs";import{a as f}from"../../chunk-23L5ZJ2U.mjs";import{a as g}from"../../chunk-DESYC5BB.mjs";import{a as d}from"../../chunk-XDP6BKTK.mjs";import{a as c}from"../../chunk-3TIFSACL.mjs";import"../../chunk-SV3TTIPR.mjs";import{a as b}from"../../chunk-HAYRX2WO.mjs";import"../../chunk-CS77R54Z.mjs";import"../../chunk-WISCWNL2.mjs";import"../../chunk-YNNW2C2U.mjs";import"../../chunk-SFLOMJ2U.mjs";import"../../chunk-UESKYRNK.mjs";import"../../chunk-NIQ4466A.mjs";import"../../chunk-6K2R3OAD.mjs";import"../../chunk-S7OK7D5I.mjs";export{b as BrandLogo,f as Footer,g as Header,c as HeaderDesktop,d as HeaderMobile,a as SimpleHeader,e as VideoHeader};
@@ -31,14 +31,14 @@ interface HolidayTrackerProps {
31
31
  leaveApprovals: LeaveRequest[];
32
32
  employees: Employee[];
33
33
  currentDate: Date;
34
- userGrade: string;
34
+ currentUser: {
35
+ grade: string;
36
+ remainingLeaveDays: number;
37
+ };
35
38
  submitLeaveRequest?: (formData: FormData) => Promise<{
36
39
  success: boolean;
37
40
  message: string;
38
41
  }>;
39
- setCurrentDate?: (date: Date) => Promise<{
40
- success: boolean;
41
- }>;
42
42
  }
43
- export declare function HolidayTracker({ holidays, currentDate, leaveApprovals, employees, userGrade, setCurrentDate, submitLeaveRequest }: HolidayTrackerProps): import("react/jsx-runtime").JSX.Element;
43
+ export declare function HolidayTracker({ holidays, currentUser, currentDate, leaveApprovals, employees, submitLeaveRequest }: HolidayTrackerProps): import("react/jsx-runtime").JSX.Element;
44
44
  export {};
@@ -2,4 +2,4 @@
2
2
  "use strict";
3
3
  "use client"
4
4
 
5
- "use strict";"use client";var pt=Object.create;var ee=Object.defineProperty;var ut=Object.getOwnPropertyDescriptor;var gt=Object.getOwnPropertyNames;var ft=Object.getPrototypeOf,bt=Object.prototype.hasOwnProperty;var vt=(e,t)=>{for(var r in t)ee(e,r,{get:t[r],enumerable:!0})},Me=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of gt(t))!bt.call(e,a)&&a!==r&&ee(e,a,{get:()=>t[a],enumerable:!(o=ut(t,a))||o.enumerable});return e};var L=(e,t,r)=>(r=e!=null?pt(ft(e)):{},Me(t||!e||!e.__esModule?ee(r,"default",{value:e,enumerable:!0}):r,e)),ht=e=>Me(ee({},"__esModule",{value:!0}),e);var tr={};vt(tr,{HolidayTracker:()=>er});module.exports=ht(tr);var ct=require("react"),mt=require("lucide-react"),B=require("lucide-react");var _e=require("clsx");var be="-",yt=e=>{let t=wt(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:l=>{let i=l.split(be);return i[0]===""&&i.length!==1&&i.shift(),ze(i,t)||xt(l)},getConflictingClassGroupIds:(l,i)=>{let p=r[l]||[];return i&&o[l]?[...p,...o[l]]:p}}},ze=(e,t)=>{var l;if(e.length===0)return t.classGroupId;let r=e[0],o=t.nextPart.get(r),a=o?ze(e.slice(1),o):void 0;if(a)return a;if(t.validators.length===0)return;let s=e.join(be);return(l=t.validators.find(({validator:i})=>i(s)))==null?void 0:l.classGroupId},Le=/^\[(.+)\]$/,xt=e=>{if(Le.test(e)){let t=Le.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},wt=e=>{let{theme:t,prefix:r}=e,o={nextPart:new Map,validators:[]};return Pt(Object.entries(e.classGroups),r).forEach(([s,l])=>{fe(l,o,s,t)}),o},fe=(e,t,r,o)=>{e.forEach(a=>{if(typeof a=="string"){let s=a===""?t:Te(t,a);s.classGroupId=r;return}if(typeof a=="function"){if(Nt(a)){fe(a(o),t,r,o);return}t.validators.push({validator:a,classGroupId:r});return}Object.entries(a).forEach(([s,l])=>{fe(l,Te(t,s),r,o)})})},Te=(e,t)=>{let r=e;return t.split(be).forEach(o=>{r.nextPart.has(o)||r.nextPart.set(o,{nextPart:new Map,validators:[]}),r=r.nextPart.get(o)}),r},Nt=e=>e.isThemeGetter,Pt=(e,t)=>t?e.map(([r,o])=>{let a=o.map(s=>typeof s=="string"?t+s:typeof s=="object"?Object.fromEntries(Object.entries(s).map(([l,i])=>[t+l,i])):s);return[r,a]}):e,Ct=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,o=new Map,a=(s,l)=>{r.set(s,l),t++,t>e&&(t=0,o=r,r=new Map)};return{get(s){let l=r.get(s);if(l!==void 0)return l;if((l=o.get(s))!==void 0)return a(s,l),l},set(s,l){r.has(s)?r.set(s,l):a(s,l)}}},Ie="!",kt=e=>{let{separator:t,experimentalParseClassName:r}=e,o=t.length===1,a=t[0],s=t.length,l=i=>{let p=[],d=0,n=0,u;for(let x=0;x<i.length;x++){let N=i[x];if(d===0){if(N===a&&(o||i.slice(x,x+s)===t)){p.push(i.slice(n,x)),n=x+s;continue}if(N==="/"){u=x;continue}}N==="["?d++:N==="]"&&d--}let C=p.length===0?i:i.substring(n),b=C.startsWith(Ie),S=b?C.substring(1):C,y=u&&u>n?u-n:void 0;return{modifiers:p,hasImportantModifier:b,baseClassName:S,maybePostfixModifierPosition:y}};return r?i=>r({className:i,parseClassName:l}):l},Rt=e=>{if(e.length<=1)return e;let t=[],r=[];return e.forEach(o=>{o[0]==="["?(t.push(...r.sort(),o),r=[]):r.push(o)}),t.push(...r.sort()),t},At=e=>({cache:Ct(e.cacheSize),parseClassName:kt(e),...yt(e)}),St=/\s+/,Dt=(e,t)=>{let{parseClassName:r,getClassGroupId:o,getConflictingClassGroupIds:a}=t,s=[],l=e.trim().split(St),i="";for(let p=l.length-1;p>=0;p-=1){let d=l[p],{modifiers:n,hasImportantModifier:u,baseClassName:C,maybePostfixModifierPosition:b}=r(d),S=!!b,y=o(S?C.substring(0,b):C);if(!y){if(!S){i=d+(i.length>0?" "+i:i);continue}if(y=o(C),!y){i=d+(i.length>0?" "+i:i);continue}S=!1}let x=Rt(n).join(":"),N=u?x+Ie:x,R=N+y;if(s.includes(R))continue;s.push(R);let $=a(y,S);for(let E=0;E<$.length;++E){let X=$[E];s.push(N+X)}i=d+(i.length>0?" "+i:i)}return i};function Mt(){let e=0,t,r,o="";for(;e<arguments.length;)(t=arguments[e++])&&(r=Fe(t))&&(o&&(o+=" "),o+=r);return o}var Fe=e=>{if(typeof e=="string")return e;let t,r="";for(let o=0;o<e.length;o++)e[o]&&(t=Fe(e[o]))&&(r&&(r+=" "),r+=t);return r};function Lt(e,...t){let r,o,a,s=l;function l(p){let d=t.reduce((n,u)=>u(n),e());return r=At(d),o=r.cache.get,a=r.cache.set,s=i,i(p)}function i(p){let d=o(p);if(d)return d;let n=Dt(p,r);return a(p,n),n}return function(){return s(Mt.apply(null,arguments))}}var w=e=>{let t=r=>r[e]||[];return t.isThemeGetter=!0,t},Be=/^\[(?:([a-z-]+):)?(.+)\]$/i,Tt=/^\d+\/\d+$/,zt=new Set(["px","full","screen"]),It=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Ft=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|He|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Bt=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Et=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Vt=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,T=e=>G(e)||zt.has(e)||Tt.test(e),I=e=>j(e,"length",qt),G=e=>!!e&&!Number.isNaN(Number(e)),ge=e=>j(e,"number",G),W=e=>!!e&&Number.isInteger(Number(e)),_t=e=>e.endsWith("%")&&G(e.slice(0,-1)),m=e=>Be.test(e),F=e=>It.test(e),Gt=new Set(["length","size","percentage"]),jt=e=>j(e,Gt,Ee),$t=e=>j(e,"position",Ee),Ht=new Set(["image","url"]),Wt=e=>j(e,Ht,Ut),Ot=e=>j(e,"",Yt),O=()=>!0,j=(e,t,r)=>{let o=Be.exec(e);return o?o[1]?typeof t=="string"?o[1]===t:t.has(o[1]):r(o[2]):!1},qt=e=>Ft.test(e)&&!Bt.test(e),Ee=()=>!1,Yt=e=>Et.test(e),Ut=e=>Vt.test(e);var Jt=()=>{let e=w("colors"),t=w("spacing"),r=w("blur"),o=w("brightness"),a=w("borderColor"),s=w("borderRadius"),l=w("borderSpacing"),i=w("borderWidth"),p=w("contrast"),d=w("grayscale"),n=w("hueRotate"),u=w("invert"),C=w("gap"),b=w("gradientColorStops"),S=w("gradientColorStopPositions"),y=w("inset"),x=w("margin"),N=w("opacity"),R=w("padding"),$=w("saturate"),E=w("scale"),X=w("sepia"),Pe=w("skew"),Ce=w("space"),ke=w("translate"),ce=()=>["auto","contain","none"],me=()=>["auto","hidden","clip","visible","scroll"],pe=()=>["auto",m,t],P=()=>[m,t],Re=()=>["",T,I],Z=()=>["auto",G,m],Ae=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],Q=()=>["solid","dashed","dotted","double","none"],Se=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ue=()=>["start","end","center","between","around","evenly","stretch"],H=()=>["","0",m],De=()=>["auto","avoid","all","avoid-page","page","left","right","column"],M=()=>[G,m];return{cacheSize:500,separator:":",theme:{colors:[O],spacing:[T,I],blur:["none","",F,m],brightness:M(),borderColor:[e],borderRadius:["none","","full",F,m],borderSpacing:P(),borderWidth:Re(),contrast:M(),grayscale:H(),hueRotate:M(),invert:H(),gap:P(),gradientColorStops:[e],gradientColorStopPositions:[_t,I],inset:pe(),margin:pe(),opacity:M(),padding:P(),saturate:M(),scale:M(),sepia:H(),skew:M(),space:P(),translate:P()},classGroups:{aspect:[{aspect:["auto","square","video",m]}],container:["container"],columns:[{columns:[F]}],"break-after":[{"break-after":De()}],"break-before":[{"break-before":De()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...Ae(),m]}],overflow:[{overflow:me()}],"overflow-x":[{"overflow-x":me()}],"overflow-y":[{"overflow-y":me()}],overscroll:[{overscroll:ce()}],"overscroll-x":[{"overscroll-x":ce()}],"overscroll-y":[{"overscroll-y":ce()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[y]}],"inset-x":[{"inset-x":[y]}],"inset-y":[{"inset-y":[y]}],start:[{start:[y]}],end:[{end:[y]}],top:[{top:[y]}],right:[{right:[y]}],bottom:[{bottom:[y]}],left:[{left:[y]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",W,m]}],basis:[{basis:pe()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",m]}],grow:[{grow:H()}],shrink:[{shrink:H()}],order:[{order:["first","last","none",W,m]}],"grid-cols":[{"grid-cols":[O]}],"col-start-end":[{col:["auto",{span:["full",W,m]},m]}],"col-start":[{"col-start":Z()}],"col-end":[{"col-end":Z()}],"grid-rows":[{"grid-rows":[O]}],"row-start-end":[{row:["auto",{span:[W,m]},m]}],"row-start":[{"row-start":Z()}],"row-end":[{"row-end":Z()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",m]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",m]}],gap:[{gap:[C]}],"gap-x":[{"gap-x":[C]}],"gap-y":[{"gap-y":[C]}],"justify-content":[{justify:["normal",...ue()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...ue(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...ue(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[R]}],px:[{px:[R]}],py:[{py:[R]}],ps:[{ps:[R]}],pe:[{pe:[R]}],pt:[{pt:[R]}],pr:[{pr:[R]}],pb:[{pb:[R]}],pl:[{pl:[R]}],m:[{m:[x]}],mx:[{mx:[x]}],my:[{my:[x]}],ms:[{ms:[x]}],me:[{me:[x]}],mt:[{mt:[x]}],mr:[{mr:[x]}],mb:[{mb:[x]}],ml:[{ml:[x]}],"space-x":[{"space-x":[Ce]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[Ce]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",m,t]}],"min-w":[{"min-w":[m,t,"min","max","fit"]}],"max-w":[{"max-w":[m,t,"none","full","min","max","fit","prose",{screen:[F]},F]}],He:[{He:[m,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-He":[{"min-He":[m,t,"min","max","fit","svh","lvh","dvh"]}],"max-He":[{"max-He":[m,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[m,t,"auto","min","max","fit"]}],"font-size":[{text:["base",F,I]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",ge]}],"font-family":[{font:[O]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",m]}],"line-clamp":[{"line-clamp":["none",G,ge]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",T,m]}],"list-image":[{"list-image":["none",m]}],"list-style-type":[{list:["none","disc","decimal",m]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[N]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[N]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Q(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",T,I]}],"underline-offset":[{"underline-offset":["auto",T,m]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:P()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",m]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",m]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[N]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...Ae(),$t]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",jt]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Wt]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[S]}],"gradient-via-pos":[{via:[S]}],"gradient-to-pos":[{to:[S]}],"gradient-from":[{from:[b]}],"gradient-via":[{via:[b]}],"gradient-to":[{to:[b]}],rounded:[{rounded:[s]}],"rounded-s":[{"rounded-s":[s]}],"rounded-e":[{"rounded-e":[s]}],"rounded-t":[{"rounded-t":[s]}],"rounded-r":[{"rounded-r":[s]}],"rounded-b":[{"rounded-b":[s]}],"rounded-l":[{"rounded-l":[s]}],"rounded-ss":[{"rounded-ss":[s]}],"rounded-mt":[{"rounded-mt":[s]}],"rounded-ee":[{"rounded-ee":[s]}],"rounded-es":[{"rounded-es":[s]}],"rounded-tl":[{"rounded-tl":[s]}],"rounded-tr":[{"rounded-tr":[s]}],"rounded-br":[{"rounded-br":[s]}],"rounded-bl":[{"rounded-bl":[s]}],"border-w":[{border:[i]}],"border-w-x":[{"border-x":[i]}],"border-w-y":[{"border-y":[i]}],"border-w-s":[{"border-s":[i]}],"border-w-e":[{"border-e":[i]}],"border-w-t":[{"border-t":[i]}],"border-w-r":[{"border-r":[i]}],"border-w-b":[{"border-b":[i]}],"border-w-l":[{"border-l":[i]}],"border-opacity":[{"border-opacity":[N]}],"border-style":[{border:[...Q(),"hidden"]}],"divide-x":[{"divide-x":[i]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[i]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[N]}],"divide-style":[{divide:Q()}],"border-color":[{border:[a]}],"border-color-x":[{"border-x":[a]}],"border-color-y":[{"border-y":[a]}],"border-color-s":[{"border-s":[a]}],"border-color-e":[{"border-e":[a]}],"border-color-t":[{"border-t":[a]}],"border-color-r":[{"border-r":[a]}],"border-color-b":[{"border-b":[a]}],"border-color-l":[{"border-l":[a]}],"divide-color":[{divide:[a]}],"outline-style":[{outline:["",...Q()]}],"outline-offset":[{"outline-offset":[T,m]}],"outline-w":[{outline:[T,I]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:Re()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[N]}],"ring-offset-w":[{"ring-offset":[T,I]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",F,Ot]}],"shadow-color":[{shadow:[O]}],opacity:[{opacity:[N]}],"mix-blend":[{"mix-blend":[...Se(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":Se()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[o]}],contrast:[{contrast:[p]}],"drop-shadow":[{"drop-shadow":["","none",F,m]}],grayscale:[{grayscale:[d]}],"hue-rotate":[{"hue-rotate":[n]}],invert:[{invert:[u]}],saturate:[{saturate:[$]}],sepia:[{sepia:[X]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[p]}],"backdrop-grayscale":[{"backdrop-grayscale":[d]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[n]}],"backdrop-invert":[{"backdrop-invert":[u]}],"backdrop-opacity":[{"backdrop-opacity":[N]}],"backdrop-saturate":[{"backdrop-saturate":[$]}],"backdrop-sepia":[{"backdrop-sepia":[X]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[l]}],"border-spacing-x":[{"border-spacing-x":[l]}],"border-spacing-y":[{"border-spacing-y":[l]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",m]}],duration:[{duration:M()}],ease:[{ease:["linear","in","out","in-out",m]}],delay:[{delay:M()}],animate:[{animate:["none","spin","ping","pulse","bounce",m]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[E]}],"scale-x":[{"scale-x":[E]}],"scale-y":[{"scale-y":[E]}],rotate:[{rotate:[W,m]}],"translate-x":[{"translate-x":[ke]}],"translate-y":[{"translate-y":[ke]}],"skew-x":[{"skew-x":[Pe]}],"skew-y":[{"skew-y":[Pe]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",m]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","mt-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",m]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":P()}],"scroll-mx":[{"scroll-mx":P()}],"scroll-my":[{"scroll-my":P()}],"scroll-ms":[{"scroll-ms":P()}],"scroll-me":[{"scroll-me":P()}],"scroll-mt":[{"scroll-mt":P()}],"scroll-mr":[{"scroll-mr":P()}],"scroll-mb":[{"scroll-mb":P()}],"scroll-ml":[{"scroll-ml":P()}],"scroll-p":[{"scroll-p":P()}],"scroll-px":[{"scroll-px":P()}],"scroll-py":[{"scroll-py":P()}],"scroll-ps":[{"scroll-ps":P()}],"scroll-pe":[{"scroll-pe":P()}],"scroll-pt":[{"scroll-pt":P()}],"scroll-pr":[{"scroll-pr":P()}],"scroll-pb":[{"scroll-pb":P()}],"scroll-pl":[{"scroll-pl":P()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",m]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[T,I,ge]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","He"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-mt","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-mt","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}};var Ve=Lt(Jt);function v(...e){return Ve((0,_e.clsx)(e))}var Ge=require("@radix-ui/react-slot"),je=require("class-variance-authority"),$e=L(require("react")),He=require("react/jsx-runtime"),te=(0,je.cva)("inline-flex items-center justify-center whitespace-nowrap rounded text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{defaultVariants:{size:"default",variant:"default"},variants:{size:{clear:"",default:"He-10 px-4 py-2",icon:"He-10 w-10",lg:"He-11 rounded px-8",sm:"He-9 rounded px-3"},variant:{default:"bg-primary text-primary-foreground hover:bg-primary-ON_HOVER",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",ghost:"hover:bg-card hover:text-accent-foreground",link:"text-primary items-start justify-start underline-offset-4 hover:underline",outline:"border border-border bg-background hover:bg-card hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80"}}}),A=$e.forwardRef(({asChild:e=!1,className:t,size:r,variant:o,...a},s)=>(0,He.jsx)(e?Ge.Slot:"button",{className:v(te({className:t,size:r,variant:o})),ref:s,...a}));A.displayName="Button";var re=L(require("react")),z=L(require("@radix-ui/react-avatar"));var q=re.forwardRef(({className:e,...t},r)=>(0,He.jsx)(z.Root,{ref:r,className:v("relative flex He-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));q.displayName=z.Root.displayName;var Y=re.forwardRef(({className:e,...t},r)=>(0,He.jsx)(z.Image,{ref:r,className:v("aspect-square He-full w-full",e),...t}));Y.displayName=z.Image.displayName;var U=re.forwardRef(({className:e,...t},r)=>(0,He.jsx)(z.Fallback,{ref:r,className:v("flex He-full w-full items-center justify-center rounded-full bg-muted",e),...t}));U.displayName=z.Fallback.displayName;function We(...e){return e.filter(Boolean).join(" ")}function Oe({currentDate:e,setCurrentDate:t,holidays:r,employees:o}){let a=new Date(e.getFullYear(),e.getMonth()+1,0).getDate();return(0,He.jsxs)("div",{className:"px-4 sm:px-6 lg:px-8",children:[(0,He.jsxs)("div",{className:"sm:flex sm:items-center",children:[(0,He.jsxs)("div",{className:"sm:flex-auto",children:[(0,He.jsx)("h1",{className:"text-2xl font-semibold text-accent",children:e.toLocaleString("default",{month:"long",year:"numeric"})}),(0,He.jsx)("p",{className:"mt-2 text-sm text-foreground",children:"All staff with holidays for the current month."})]}),(0,He.jsxs)("div",{className:"mt-4 sm:ml-16 sm:mt-0 sm:flex-none",children:[(0,He.jsx)(A,{onClick:()=>t(new Date(e.getFullYear(),e.getMonth()-1,1)),variant:"outline",size:"icon",className:"mr-2",children:(0,He.jsx)(mt.ChevronLeft,{className:"He-4 w-4"})}),(0,He.jsx)(A,{onClick:()=>t(new Date(e.getFullYear(),e.getMonth()+1,1)),variant:"outline",size:"icon",children:(0,He.jsx)(mt.ChevronRight,{className:"He-4 w-4"})})]})]}),(0,He.jsx)("div",{className:"mt-8 flow-root",children:(0,He.jsx)("div",{className:"-mx-4 -my-2 overflow-x-auto sm:-mx-6 lg:-mx-8",children:(0,He.jsx)("div",{className:"inline-block min-w-full py-2 align-middle",children:(0,He.jsxs)("table",{className:"min-w-full border-separate border-spacing-0",children:[(0,He.jsx)("thead",{children:(0,He.jsxs)("tr",{children:[(0,He.jsx)("th",{scope:"col",className:"sticky top-0 z-10 border-b border-r border-gray-300 bg-white bg-opacity-75 py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 backdrop-blur backdrop-filter sm:pl-6 lg:pl-8",children:"Employee"}),[...Array(a)].map((s,l)=>(0,He.jsx)("th",{scope:"col",className:"sticky top-0 z-10 border-b border-r border-gray-300 bg-white bg-opacity-75 px-0 py-3.5 text-center text-sm font-semibold text-gray-900 backdrop-blur backdrop-filter",children:l+1},l))]})}),(0,He.jsx)("tbody",{children:o.map((s,l)=>(0,He.jsxs)("tr",{children:[(0,He.jsx)("td",{className:We(l!==o.length-1?" border-gray-200":"","whitespace-nowrap py-4 border-r pl-4 pr-3 text-sm font-medium text-gray-900 sm:pl-6 lg:pl-8"),children:(0,He.jsxs)("div",{className:"flex items-center",children:[(0,He.jsxs)(q,{className:"He-11 w-11",children:[(0,He.jsx)(Y,{src:s.image,alt:s.name}),(0,He.jsx)(U,{children:s.name.split(" ").map(i=>i[0]).join("")})]}),(0,He.jsx)("div",{className:"ml-4",children:(0,He.jsx)("div",{className:"font-medium text-accent",children:s.name})})]})}),[...Array(a)].map((i,p)=>{let d=new Date(e.getFullYear(),e.getMonth(),p+1),n=r.find(u=>u.userId===s.id&&new Date(u.startDate)<=d&&new Date(u.endDate)>=d);return(0,He.jsx)("td",{className:We(l!==o.length-1?"border-r border-gray-200":"","whitespace-nowrap border-r border-gray-200"),children:(0,He.jsx)("div",{className:`He-6 w-6 mx-auto rounded-full overflow-hidden ${n?n.status==="approved"?"bg-green-500":n.status==="rejected"?"bg-red-500":"bg-gray-600":"bg-gray-100"}`,title:n?`${s.name}: ${n.status} (${n.startDate} - ${n.endDate}) - ${n.leaveType}`:"",children:n&&n.leaveType!=="Full Day"&&(0,He.jsx)("div",{className:`He-3 w-6 ${n.leaveType==="Morning","bg-white rounded-t-full"}`})})},`${s.id}-${p}`)})]},s.id))})]})})})})]})}function Ye({currentDate:e,setCurrentDate:t,holidays:r}){let[o,a]=(0,ct.useState)(null),s=new Date(e.getFullYear(),e.getMonth()+1,0).getDate(),l=new Date(e.getFullYear(),e.getMonth(),1).getDay(),i=Array.from({length:42},(n,u)=>{let C=new Date(e.getFullYear(),e.getMonth(),u-l+1);return{date:C,isCurrentMonth:C.getMonth()===e.getMonth(),isToday:C.toDateString()===new Date().toDateString(),holidays:r.filter(b=>new Date(b.startDate)<=C&&new Date(b.endDate)>=C)}}),p=()=>{t(new Date(e.getFullYear(),e.getMonth()-1,1))},d=()=>{t(new Date(e.getFullYear(),e.getMonth()+1,1))};return(0,He.jsxs)("div",{className:"lg:flex lg:He-full lg:flex-col",children:[(0,He.jsxs)("header",{className:"flex items-center justify-between border-b border-gray-200 px-6 py-4 lg:flex-none",children:[(0,He.jsx)("h1",{className:"text-base font-semibold text-foreground",children:(0,He.jsx)("time",{dateTime:e.toISOString(),children:e.toLocaleString("default",{month:"long",year:"numeric"})})}),(0,He.jsx)("div",{className:"flex items-center",children:(0,He.jsxs)("div",{className:"relative flex items-center rounded-md gap-1 md:items-stretch",children:[(0,He.jsxs)(A,{onClick:p,variant:"outline",size:"icon",className:"rounded-l-md border-accent hover:text-accent",children:[(0,He.jsx)("span",{className:"sr-only",children:"Previous month"}),(0,He.jsx)(mt.ChevronLeft,{className:"He-5 w-5","aria-hidden":"true"})]}),(0,He.jsx)(A,{variant:"outline",className:"hidden border-l border-r border-accent px-3.5 text-sm font-semibold text-accent hover:bg-gray-50 focus:relative md:block",children:"Today"}),(0,He.jsxs)(A,{onClick:d,variant:"outline",size:"icon",className:"rounded-r-md border-accent hover:text-accent",children:[(0,He.jsx)("span",{className:"sr-only",children:"Next month"}),(0,He.jsx)(mt.ChevronRight,{className:"He-5 w-5","aria-hidden":"true"})]})]})})]}),(0,He.jsxs)("div",{className:"shadow ring-1 ring-black ring-opacity-5 lg:flex lg:flex-auto lg:flex-col",children:[(0,He.jsxs)("div",{className:"grid grid-cols-7 gap-px border-b border-gray-300 bg-gray-200 text-center text-xs font-semibold leading-6 text-gray-700 lg:flex-none",children:[(0,He.jsxs)("div",{className:"bg-white py-2",children:["M",(0,He.jsx)("span",{className:"sr-only sm:not-sr-only",children:"on"})]}),(0,He.jsxs)("div",{className:"bg-white py-2",children:["T",(0,He.jsx)("span",{className:"sr-only sm:not-sr-only",children:"ue"})]}),(0,He.jsxs)("div",{className:"bg-white py-2",children:["W",(0,He.jsx)("span",{className:"sr-only sm:not-sr-only",children:"ed"})]}),(0,He.jsxs)("div",{className:"bg-white py-2",children:["T",(0,He.jsx)("span",{className:"sr-only sm:not-sr-only",children:"hu"})]}),(0,He.jsxs)("div",{className:"bg-white py-2",children:["F",(0,He.jsx)("span",{className:"sr-only sm:not-sr-only",children:"ri"})]}),(0,He.jsxs)("div",{className:"bg-white py-2",children:["S",(0,He.jsx)("span",{className:"sr-only sm:not-sr-only",children:"je"})]}),(0,He.jsxs)("div",{className:"bg-white py-2",children:["S",(0,He.jsx)("span",{className:"sr-only sm:not-sr-only",children:"un"})]})]}),(0,He.jsxs)("div",{className:"flex bg-gray-200 text-xs leading-6 text-gray-700 lg:flex-auto",children:[(0,He.jsx)("div",{className:"hidden w-full lg:grid lg:grid-cols-7 lg:grid-rows-6 lg:gap-px",children:i.map(n=>(0,He.jsxs)("div",{className:v(n.isCurrentMonth?"bg-white":"bg-gray-50 text-gray-500","relative px-3 py-2"),children:[(0,He.jsx)("time",{dateTime:n.date.toISOString(),className:v("flex He-6 w-6 items-center justify-center rounded-full",n.isToday&&"bg-indigo-600 font-semibold text-white"),children:n.date.getDate()}),n.holidays.length>0&&(0,He.jsx)("ol",{className:"mt-2 space-y-1",children:n.holidays.map(u=>(0,He.jsx)("li",{children:(0,He.jsx)("div",{className:`text-xs px-1 py-0.5 rounded ${u.status==="approved"?"border-green-500":"border-gray-500"} border`,children:u.userName})},u.id))})]},n.date.toISOString()))}),(0,He.jsx)("div",{className:"isolate grid w-full grid-cols-7 grid-rows-6 gap-px lg:hidden",children:i.map(n=>(0,He.jsxs)("button",{type:"button",className:v(n.isCurrentMonth?"bg-white":"bg-gray-50",(n.date===o||n.isToday)&&"font-semibold",n.date===o&&"text-white",!n.date&&n.isToday&&"text-indigo-600",n.date!==o&&n.isCurrentMonth&&!n.isToday&&"text-gray-900",n.date!==o&&!n.isCurrentMonth&&!n.isToday&&"text-gray-500","flex He-14 flex-col px-3 py-2 hover:bg-gray-100 focus:z-10"),children:[(0,He.jsx)("time",{dateTime:n.date.toISOString(),className:v("ml-auto",n.date===o&&n.isToday&&"flex He-6 w-6 items-center justify-center rounded-full bg-indigo-600",n.date===o&&!n.isToday&&"flex He-6 w-6 items-center justify-center rounded-full bg-gray-900"),children:n.date.getDate()}),(0,He.jsxs)("span",{className:"sr-only",children:[n.holidays.length," holidays"]}),n.holidays.length>0&&(0,He.jsx)("span",{className:"-mx-0.5 mt-auto flex flex-wrap-reverse",children:n.holidays.map(u=>(0,He.jsx)("span",{className:`mx-0.5 mb-1 He-1.5 w-1.5 rounded-full ${u.status==="approved"?"bg-green-500":"bg-gray-500"}`},u.id))})]},n.date.toISOString()))})]})]})]})}var Ue=L(require("react")),ve=L(require("@radix-ui/react-label"));var Kt=(0,je.cva)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),J=Ue.forwardRef(({className:e,...t},r)=>(0,He.jsx)(ve.Root,{ref:r,className:v(Kt(),e),...t}));J.displayName=ve.Root.displayName;var Xe=require("react-day-picker");function ne({className:e,classNames:t,showOutsideDays:r=!0,...o}){return(0,He.jsx)(Xe.DayPicker,{showOutsideDays:r,className:v("p-3",e),classNames:{months:"flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0",month:"space-y-4",caption:"flex justify-center pt-1 relative items-center",caption_label:"text-sm font-medium",nav:"space-x-1 flex items-center",nav_button:v(te({variant:"outline"}),"He-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100"),nav_button_previous:"absolute left-1",nav_button_next:"absolute right-1",table:"w-full border-collapse space-y-1",head_row:"flex",head_cell:"text-muted-foreground rounded-md w-8 font-normal text-[0.8rem]",row:"flex w-full mt-2",cell:v("relative p-0 text-center text-sm focus-within:relative focus-within:z-20 [&:has([aria-selected])]:bg-accent [&:has([aria-selected].day-outside)]:bg-accent/50 [&:has([aria-selected].day-range-end)]:rounded-r-md",o.mode==="range"?"[&:has(>.day-range-end)]:rounded-r-md [&:has(>.day-range-start)]:rounded-l-md first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md":"[&:has([aria-selected])]:rounded-md"),day:v(te({variant:"ghost"}),"He-8 w-8 p-0 font-normal aria-selected:opacity-100"),day_range_start:"day-range-start",day_range_end:"day-range-end",day_selected:"bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",day_today:"bg-accent text-accent-foreground",day_outside:"day-outside text-muted-foreground aria-selected:bg-accent/50 aria-selected:text-muted-foreground",day_disabled:"text-muted-foreground opacity-50",day_range_middle:"aria-selected:bg-accent aria-selected:text-accent-foreground",day_hidden:"invisible",...t},...o})}ne.displayName="Calendar";var Qe=L(require("react")),D=L(require("@radix-ui/react-popover"));var ye=D.Root,xe=D.Trigger;var ie=Qe.forwardRef(({className:e,align:t="center",sideOffset:r=4,...o},a)=>(0,He.jsx)(D.Portal,{children:(0,He.jsx)(D.Content,{ref:a,align:t,sideOffset:r,className:v("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...o})}));ie.displayName=D.Content.displayName;var we=require("date-fns"),et=require("next/navigation"),_=require("sonner"),Xt=({options:e,value:t,onChange:r,disabled:o=[]})=>(0,He.jsx)("div",{className:"flex space-x-2",children:e.map((a,s)=>(0,He.jsx)(A,{type:"button",variant:t===a?"default":"outline",onClick:()=>r(a),disabled:o[s],className:"flex-1 hover:bg-accent hover:text-accent-foreground",children:a},a))});function tt({userId:e,userName:t,remainingDays:r,submitLeaveRequest:o}){let[a,s]=(0,ct.useState)(void 0),[l,i]=(0,ct.useState)(void 0),[p,d]=(0,ct.useState)("Full Day"),[n,u]=(0,ct.useState)(!1),C=(0,et.useRouter)();(0,ct.useEffect)(()=>{u(a!==l||!a||!l),n&&d("Full Day")},[a,l]);let b=y=>{d(y)};return(0,He.jsxs)("div",{className:"max-w-2xl",children:[(0,He.jsx)("h2",{className:"text-lg font-semibold mb-4",children:"Request Leave"}),(0,He.jsxs)("p",{className:"text-sm text-gray-500 mb-4",children:["Remaining leave days: ",r]}),(0,He.jsxs)("form",{onSubmit:async y=>{if(y.preventDefault(),!a||!l){_.toast.error("Please select both start and end dates");return}let x=Math.ceil((l.getTime()-a.getTime())/(1e3*60*60*24))+1;if((p==="Morning"||p==="Afternoon")&&(x=.5),x>r){_.toast.error("You do not have enough leave days remaining");return}let N=new FormData;N.append("userId",e),N.append("userName",t),N.append("startDate",a.toISOString()),N.append("endDate",l.toISOString()),N.append("leaveType",p),N.append("duration",x.toString());let R=await(o||Zt)(N);R.success?(_.toast.success(R.message),s(void 0),i(void 0),d("Full Day"),C.refresh()):_.toast.error(`Error: ${R.message}`)},className:"space-y-4",children:[(0,He.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,He.jsxs)("div",{className:"flex flex-col space-y-2",children:[(0,He.jsx)(J,{htmlFor:"startDate",children:"Start Date"}),(0,He.jsxs)(ye,{children:[(0,He.jsx)(xe,{asChild:!0,children:(0,He.jsxs)(A,{variant:"outline",className:v("w-full justify-start text-left font-normal",!a&&"text-muted-foreground"),children:[(0,He.jsx)(mt.CalendarIcon,{className:"mr-2 He-4 w-4"}),a?(0,we.format)(a,"PPP"):(0,He.jsx)("span",{children:"Pick a date"})]})}),(0,He.jsx)(ie,{className:"w-auto p-0",align:"start",children:(0,He.jsx)(ne,{mode:"single",selected:a,onSelect:y=>{s(y),y&&(!l||y>l)&&i(y)},initialFocus:!0})})]})]}),(0,He.jsxs)("div",{className:"flex flex-col space-y-2",children:[(0,He.jsx)(J,{htmlFor:"endDate",children:"End Date"}),(0,He.jsxs)(ye,{children:[(0,He.jsx)(xe,{asChild:!0,children:(0,He.jsxs)(A,{variant:"outline",className:v("w-full justify-start text-left font-normal",!l&&"text-muted-foreground"),children:[(0,He.jsx)(mt.CalendarIcon,{className:"mr-2 He-4 w-4"}),l?(0,we.format)(l,"PPP"):(0,He.jsx)("span",{children:"Pick a date"})]})}),(0,He.jsx)(ie,{className:"w-auto p-0",align:"start",children:(0,He.jsx)(ne,{mode:"single",selected:l,onSelect:i,disabled:y=>a?y<a:!1,initialFocus:!0})})]})]})]}),(0,He.jsxs)("div",{className:"space-y-2",children:[(0,He.jsx)(J,{children:"Leave Type"}),(0,He.jsx)(Xt,{options:["Full Day","Morning","Afternoon"],value:p,onChange:b,disabled:[!1,n,n]})]}),(0,He.jsx)(A,{type:"submit",className:"w-full hover:bg-accent hover:text-accent-foreground",children:"Submit Request"})]}),(0,He.jsx)(_.Toaster,{richColors:!0,position:"top-right",closeButton:!0,visibleToasts:9})]})}var Zt=async e=>{let t={};return e.forEach((r,o)=>{t[o]=r}),console.log("Leave request submitted:",t),{success:!0,message:`Leave request submitted successfully for ${e.get("duration")}`}};var K=L(require("@radix-ui/react-checkbox")),ot=L(require("react")),de=ot.forwardRef(({className:e,...t},r)=>(0,He.jsx)(K.Root,{className:v("peer He-4 w-4 shrink-0 rounded border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),ref:r,...t,children:(0,He.jsx)(K.Indicator,{className:v("flex items-center justify-center text-current"),children:(0,He.jsx)(mt.Check,{className:"He-4 w-4"})})}));de.displayName=K.Root.displayName;var Qt=(0,je.cva)("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function st({className:e,variant:t,...r}){return(0,He.jsx)("div",{className:v(Qt({variant:t}),e),...r})}function lt({leaveRequests:e,onApprove:t,onReject:r}){let[o,a]=(0,ct.useState)([]),s=()=>{o.length===e.length?a([]):a(e.map(d=>d.id))},l=d=>{a(n=>n.includes(d)?n.filter(u=>u!==d):[...n,d])},i=()=>{t(o),a([])},p=()=>{r(o),a([])};return(0,He.jsxs)("div",{className:"space-y-4",children:[(0,He.jsxs)("div",{className:"flex justify-between items-center",children:[(0,He.jsx)("h2",{className:"text-2xl font-bold",children:"Approve Leave Requests"}),(0,He.jsxs)("div",{className:"space-x-2",children:[(0,He.jsx)(A,{onClick:i,disabled:o.length===0,variant:"default",children:"Approve Selected"}),(0,He.jsx)(A,{onClick:p,disabled:o.length===0,variant:"destructive",children:"Reject Selected"})]})]}),(0,He.jsx)("div",{className:"overflow-hidden sm:rounded-md",children:(0,He.jsxs)("ul",{className:"divide-y divide-gray-200",children:[(0,He.jsx)("li",{className:"px-4 py-4 sm:px-6",children:(0,He.jsxs)("div",{className:"flex items-center justify-between",children:[(0,He.jsxs)("div",{className:"flex items-center",children:[(0,He.jsx)(de,{id:"select-all",checked:o.length===e.length,onCheckedChange:s,className:"border-accent"}),(0,He.jsx)("label",{htmlFor:"select-all",className:"ml-2 text-sm font-medium text-foreground",children:"Select All"})]}),(0,He.jsxs)("span",{className:"text-sm font-medium text-gray-500",children:[o.length," of ",e.length," selected"]})]})}),e.map(d=>(0,He.jsx)("li",{className:"px-4 py-4 sm:px-6 group hover:bg-gray-50",children:(0,He.jsxs)("div",{className:"flex items-center justify-between",children:[(0,He.jsxs)("div",{className:"flex items-center",children:[(0,He.jsx)(de,{id:`select-${d.id}`,checked:o.includes(d.id),onCheckedChange:()=>l(d.id),className:"border-accent"}),(0,He.jsxs)("div",{className:"ml-3 flex items-center",children:[(0,He.jsxs)(q,{className:"He-10 w-10",children:[(0,He.jsx)(Y,{src:d.userImage,alt:d.userName}),(0,He.jsx)(U,{children:d.userName.split(" ").map(n=>n[0]).join("")})]}),(0,He.jsx)("div",{className:"ml-3",children:(0,He.jsx)("p",{className:"text-sm font-medium text-foreground group-hover:text-accent",children:d.userName})})]})]}),(0,He.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,He.jsxs)("span",{className:"text-sm text-gray-500",children:[new Date(d.startDate).toLocaleDateString(),d.startDate!==d.endDate&&` - ${new Date(d.endDate).toLocaleDateString()}`,d.leaveType!="Full Day"&&` (${d.leaveType})`,` - ${d.totalDays} day${d.totalDays!==1?"s":""}`]}),(0,He.jsx)(st,{variant:d.status==="approved"?"default":d.status==="rejected"?"destructive":"secondary",children:d.status})]})]})},d.id))]})})]})}function dt(...e){return e.filter(Boolean).join(" ")}function er({holidays:e,currentDate:t,leaveApprovals:r,employees:o,userGrade:a,setCurrentDate:s=async()=>({success:!0}),submitLeaveRequest:l}){let[i,p]=(0,ct.useState)("Calendar View"),d=!1,n={id:"manager1",firstName:"Manager",lastName:"User",grade:"manager",remainingLeaveDays:20};if(d)return(0,He.jsx)("div",{className:"flex justify-center items-center He-screen",children:(0,He.jsx)("div",{className:"animate-spin rounded-full He-32 w-32 border-t-2 border-b-2 border-gray-900"})});let u=n,C=[{name:"Grid View",icon:B.Grid,current:i==="Grid View"},{name:"Calendar View",icon:B.CalendarDays,current:i==="Calendar View"},{name:"Request Leave",icon:B.PlusCircle,current:i==="Request Leave"},{name:"Approve Leave",icon:B.CheckSquare,current:i==="Approve Leave"}];return(0,He.jsxs)("div",{className:"container mx-auto p-4",children:[(0,He.jsx)("h1",{className:"text-3xl font-bold mb-4",children:"Holiday Tracker"}),(0,He.jsxs)("div",{className:"mb-8",children:[(0,He.jsxs)("div",{className:"sm:hidden",children:[(0,He.jsx)("select",{value:i,onChange:b=>p(b.target.value),className:"block w-full rounded-md border-gray-300 py-2 pl-3 pr-10 text-base focus:border-indigo-500 focus:outline-none focus:ring-indigo-500 sm:text-sm",children:C.map(b=>(0,He.jsx)("option",{children:b.name},b.name))}),(0,He.jsx)(mt.ChevronDown,{className:"pointer-events-none absolute right-3 top-3 He-5 w-5 text-gray-400","aria-hidden":"true"})]}),(0,He.jsx)("div",{className:"hidden sm:block",children:(0,He.jsx)("div",{className:"border-b border-gray-200",children:(0,He.jsx)("nav",{className:"-mb-px flex space-x-8","aria-label":"Tabs",children:C.map(b=>(0,He.jsxs)("a",{onClick:()=>{(b.name!=="Approve Leave"||a==="Manager"||a==="Senior Manager"||a==="Partner")&&p(b.name)},className:dt(b.current?"border-accent text-accent":"border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700",b.name==="Approve Leave"&&a!=="Manager"&&a!=="Senior Manager"&&a!=="Partner"?"cursor-not-allowed opacity-50":"","group inline-flex items-center border-b-2 py-4 px-1 text-sm font-medium"),"aria-current":b.current?"page":void 0,children:[(0,He.jsx)(b.icon,{className:dt(b.current?"text-accent":"text-gray-400 group-hover:text-gray-500","-ml-0.5 mr-2 He-5 w-5"),"aria-hidden":"true"}),(0,He.jsx)("span",{children:b.name})]},b.name))})})})]}),i==="Grid View"&&(0,He.jsx)(Oe,{currentDate:t,setCurrentDate:s,holidays:e,employees:o}),i==="Calendar View"&&(0,He.jsx)(Ye,{currentDate:t,setCurrentDate:s,holidays:e}),i==="Request Leave"&&(0,He.jsx)(tt,{userId:u.id,userName:`${u.firstName} ${u.lastName}`,remainingDays:u.remainingLeaveDays,submitLeaveRequest:b=>l?l(b):Promise.resolve({success:!1,message:"Submit leave request function not provided"})}),i==="Approve Leave"&&(0,He.jsx)(lt,{leaveRequests:r,onApprove:()=>{},onReject:()=>{}})]})}0&&(module.exports={HolidayTracker});
5
+ "use strict";"use client";var gt=Object.create;var ee=Object.defineProperty;var ft=Object.getOwnPropertyDescriptor;var bt=Object.getOwnPropertyNames;var vt=Object.getPrototypeOf,ht=Object.prototype.hasOwnProperty;var yt=(e,t)=>{for(var r in t)ee(e,r,{get:t[r],enumerable:!0})},Me=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of bt(t))!ht.call(e,a)&&a!==r&&ee(e,a,{get:()=>t[a],enumerable:!(o=ft(t,a))||o.enumerable});return e};var L=(e,t,r)=>(r=e!=null?gt(vt(e)):{},Me(t||!e||!e.__esModule?ee(r,"default",{value:e,enumerable:!0}):r,e)),xt=e=>Me(ee({},"__esModule",{value:!0}),e);var or={};yt(or,{HolidayTracker:()=>rr});module.exports=xt(or);var ct=require("react"),mt=require("lucide-react"),B=require("lucide-react");var Ve=require("clsx");var be="-",wt=e=>{let t=Pt(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:i=>{let l=i.split(be);return l[0]===""&&l.length!==1&&l.shift(),ze(l,t)||Nt(i)},getConflictingClassGroupIds:(i,l)=>{let u=r[i]||[];return l&&o[i]?[...u,...o[i]]:u}}},ze=(e,t)=>{var i;if(e.length===0)return t.classGroupId;let r=e[0],o=t.nextPart.get(r),a=o?ze(e.slice(1),o):void 0;if(a)return a;if(t.validators.length===0)return;let n=e.join(be);return(i=t.validators.find(({validator:l})=>l(n)))==null?void 0:i.classGroupId},Le=/^\[(.+)\]$/,Nt=e=>{if(Le.test(e)){let t=Le.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},Pt=e=>{let{theme:t,prefix:r}=e,o={nextPart:new Map,validators:[]};return kt(Object.entries(e.classGroups),r).forEach(([n,i])=>{fe(i,o,n,t)}),o},fe=(e,t,r,o)=>{e.forEach(a=>{if(typeof a=="string"){let n=a===""?t:Te(t,a);n.classGroupId=r;return}if(typeof a=="function"){if(Ct(a)){fe(a(o),t,r,o);return}t.validators.push({validator:a,classGroupId:r});return}Object.entries(a).forEach(([n,i])=>{fe(i,Te(t,n),r,o)})})},Te=(e,t)=>{let r=e;return t.split(be).forEach(o=>{r.nextPart.has(o)||r.nextPart.set(o,{nextPart:new Map,validators:[]}),r=r.nextPart.get(o)}),r},Ct=e=>e.isThemeGetter,kt=(e,t)=>t?e.map(([r,o])=>{let a=o.map(n=>typeof n=="string"?t+n:typeof n=="object"?Object.fromEntries(Object.entries(n).map(([i,l])=>[t+i,l])):n);return[r,a]}):e,Rt=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,o=new Map,a=(n,i)=>{r.set(n,i),t++,t>e&&(t=0,o=r,r=new Map)};return{get(n){let i=r.get(n);if(i!==void 0)return i;if((i=o.get(n))!==void 0)return a(n,i),i},set(n,i){r.has(n)?r.set(n,i):a(n,i)}}},Ie="!",At=e=>{let{separator:t,experimentalParseClassName:r}=e,o=t.length===1,a=t[0],n=t.length,i=l=>{let u=[],d=0,s=0,b;for(let x=0;x<l.length;x++){let R=l[x];if(d===0){if(R===a&&(o||l.slice(x,x+n)===t)){u.push(l.slice(s,x)),s=x+n;continue}if(R==="/"){b=x;continue}}R==="["?d++:R==="]"&&d--}let p=u.length===0?l:l.substring(s),y=p.startsWith(Ie),k=y?p.substring(1):p,P=b&&b>s?b-s:void 0;return{modifiers:u,hasImportantModifier:y,baseClassName:k,maybePostfixModifierPosition:P}};return r?l=>r({className:l,parseClassName:i}):i},St=e=>{if(e.length<=1)return e;let t=[],r=[];return e.forEach(o=>{o[0]==="["?(t.push(...r.sort(),o),r=[]):r.push(o)}),t.push(...r.sort()),t},Dt=e=>({cache:Rt(e.cacheSize),parseClassName:At(e),...wt(e)}),Mt=/\s+/,Lt=(e,t)=>{let{parseClassName:r,getClassGroupId:o,getConflictingClassGroupIds:a}=t,n=[],i=e.trim().split(Mt),l="";for(let u=i.length-1;u>=0;u-=1){let d=i[u],{modifiers:s,hasImportantModifier:b,baseClassName:p,maybePostfixModifierPosition:y}=r(d),k=!!y,P=o(k?p.substring(0,y):p);if(!P){if(!k){l=d+(l.length>0?" "+l:l);continue}if(P=o(p),!P){l=d+(l.length>0?" "+l:l);continue}k=!1}let x=St(s).join(":"),R=b?x+Ie:x,S=R+P;if(n.includes(S))continue;n.push(S);let $=a(P,k);for(let E=0;E<$.length;++E){let X=$[E];n.push(R+X)}l=d+(l.length>0?" "+l:l)}return l};function Tt(){let e=0,t,r,o="";for(;e<arguments.length;)(t=arguments[e++])&&(r=Fe(t))&&(o&&(o+=" "),o+=r);return o}var Fe=e=>{if(typeof e=="string")return e;let t,r="";for(let o=0;o<e.length;o++)e[o]&&(t=Fe(e[o]))&&(r&&(r+=" "),r+=t);return r};function zt(e,...t){let r,o,a,n=i;function i(u){let d=t.reduce((s,b)=>b(s),e());return r=Dt(d),o=r.cache.get,a=r.cache.set,n=l,l(u)}function l(u){let d=o(u);if(d)return d;let s=Lt(u,r);return a(u,s),s}return function(){return n(Tt.apply(null,arguments))}}var w=e=>{let t=r=>r[e]||[];return t.isThemeGetter=!0,t},Be=/^\[(?:([a-z-]+):)?(.+)\]$/i,It=/^\d+\/\d+$/,Ft=new Set(["px","full","screen"]),Bt=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Et=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|et|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|He|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Gt=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Vt=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,_t=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,T=e=>_(e)||Ft.has(e)||It.test(e),I=e=>j(e,"length",Jt),_=e=>!!e&&!Number.isNaN(Number(e)),ge=e=>j(e,"number",_),W=e=>!!e&&Number.isInteger(Number(e)),jt=e=>e.endsWith("%")&&_(e.slice(0,-1)),m=e=>Be.test(e),F=e=>Bt.test(e),$t=new Set(["length","size","percentage"]),Ht=e=>j(e,$t,Ee),Wt=e=>j(e,"position",Ee),Ot=new Set(["image","url"]),qt=e=>j(e,Ot,Ut),Yt=e=>j(e,"",Kt),O=()=>!0,j=(e,t,r)=>{let o=Be.exec(e);return o?o[1]?typeof t=="string"?o[1]===t:t.has(o[1]):r(o[2]):!1},Jt=e=>Et.test(e)&&!Gt.test(e),Ee=()=>!1,Kt=e=>Vt.test(e),Ut=e=>_t.test(e);var Xt=()=>{let e=w("colors"),t=w("spacing"),r=w("blur"),o=w("brightness"),a=w("borderColor"),n=w("borderRadius"),i=w("borderSpacing"),l=w("borderWidth"),u=w("contrast"),d=w("grayscale"),s=w("hueRotate"),b=w("invert"),p=w("gap"),y=w("gradientColorStops"),k=w("gradientColorStopPositions"),P=w("inset"),x=w("margin"),R=w("opacity"),S=w("padding"),$=w("saturate"),E=w("scale"),X=w("sepia"),Pe=w("skew"),Ce=w("space"),ke=w("translate"),ce=()=>["auto","contain","none"],me=()=>["auto","hidden","clip","visible","scroll"],pe=()=>["auto",m,t],N=()=>[m,t],Re=()=>["",T,I],Z=()=>["auto",_,m],Ae=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],Q=()=>["solid","dashed","dotted","double","none"],Se=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ue=()=>["start","end","center","between","around","evenly","stretch"],H=()=>["","0",m],De=()=>["auto","avoid","all","avoid-page","page","left","right","column"],M=()=>[_,m];return{cacheSize:500,separator:":",theme:{colors:[O],spacing:[T,I],blur:["none","",F,m],brightness:M(),borderColor:[e],borderRadius:["none","","full",F,m],borderSpacing:N(),borderWidth:Re(),contrast:M(),grayscale:H(),hueRotate:M(),invert:H(),gap:N(),gradientColorStops:[e],gradientColorStopPositions:[jt,I],inset:pe(),margin:pe(),opacity:M(),padding:N(),saturate:M(),scale:M(),sepia:H(),skew:M(),space:N(),translate:N()},classGroups:{aspect:[{aspect:["auto","square","video",m]}],container:["container"],columns:[{columns:[F]}],"break-after":[{"break-after":De()}],"break-before":[{"break-before":De()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...Ae(),m]}],overflow:[{overflow:me()}],"overflow-x":[{"overflow-x":me()}],"overflow-y":[{"overflow-y":me()}],overscroll:[{overscroll:ce()}],"overscroll-x":[{"overscroll-x":ce()}],"overscroll-y":[{"overscroll-y":ce()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[P]}],"inset-x":[{"inset-x":[P]}],"inset-y":[{"inset-y":[P]}],start:[{start:[P]}],end:[{end:[P]}],top:[{top:[P]}],right:[{right:[P]}],bottom:[{bottom:[P]}],left:[{left:[P]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",W,m]}],basis:[{basis:pe()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",m]}],grow:[{grow:H()}],shrink:[{shrink:H()}],order:[{order:["first","last","none",W,m]}],"grid-cols":[{"grid-cols":[O]}],"col-start-end":[{col:["auto",{span:["full",W,m]},m]}],"col-start":[{"col-start":Z()}],"col-end":[{"col-end":Z()}],"grid-rows":[{"grid-rows":[O]}],"row-start-end":[{row:["auto",{span:[W,m]},m]}],"row-start":[{"row-start":Z()}],"row-end":[{"row-end":Z()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",m]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",m]}],gap:[{gap:[p]}],"gap-x":[{"gap-x":[p]}],"gap-y":[{"gap-y":[p]}],"justify-content":[{justify:["normal",...ue()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...ue(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...ue(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[S]}],px:[{px:[S]}],py:[{py:[S]}],ps:[{ps:[S]}],pe:[{pe:[S]}],et:[{et:[S]}],pr:[{pr:[S]}],pb:[{pb:[S]}],pl:[{pl:[S]}],m:[{m:[x]}],mx:[{mx:[x]}],my:[{my:[x]}],ms:[{ms:[x]}],me:[{me:[x]}],mt:[{mt:[x]}],mr:[{mr:[x]}],mb:[{mb:[x]}],ml:[{ml:[x]}],"space-x":[{"space-x":[Ce]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[Ce]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",m,t]}],"min-w":[{"min-w":[m,t,"min","max","fit"]}],"max-w":[{"max-w":[m,t,"none","full","min","max","fit","prose",{screen:[F]},F]}],He:[{He:[m,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-He":[{"min-He":[m,t,"min","max","fit","svh","lvh","dvh"]}],"max-He":[{"max-He":[m,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[m,t,"auto","min","max","fit"]}],"font-size":[{text:["base",F,I]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",ge]}],"font-family":[{font:[O]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",m]}],"line-clamp":[{"line-clamp":["none",_,ge]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",T,m]}],"list-image":[{"list-image":["none",m]}],"list-style-type":[{list:["none","disc","decimal",m]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[R]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[R]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Q(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",T,I]}],"underline-offset":[{"underline-offset":["auto",T,m]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:N()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",m]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",m]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[R]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...Ae(),Wt]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Ht]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},qt]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[k]}],"gradient-via-pos":[{via:[k]}],"gradient-to-pos":[{to:[k]}],"gradient-from":[{from:[y]}],"gradient-via":[{via:[y]}],"gradient-to":[{to:[y]}],rounded:[{rounded:[n]}],"rounded-s":[{"rounded-s":[n]}],"rounded-e":[{"rounded-e":[n]}],"rounded-t":[{"rounded-t":[n]}],"rounded-r":[{"rounded-r":[n]}],"rounded-b":[{"rounded-b":[n]}],"rounded-l":[{"rounded-l":[n]}],"rounded-ss":[{"rounded-ss":[n]}],"rounded-se":[{"rounded-se":[n]}],"rounded-ee":[{"rounded-ee":[n]}],"rounded-es":[{"rounded-es":[n]}],"rounded-tl":[{"rounded-tl":[n]}],"rounded-tr":[{"rounded-tr":[n]}],"rounded-br":[{"rounded-br":[n]}],"rounded-bl":[{"rounded-bl":[n]}],"border-w":[{border:[l]}],"border-w-x":[{"border-x":[l]}],"border-w-y":[{"border-y":[l]}],"border-w-s":[{"border-s":[l]}],"border-w-e":[{"border-e":[l]}],"border-w-t":[{"border-t":[l]}],"border-w-r":[{"border-r":[l]}],"border-w-b":[{"border-b":[l]}],"border-w-l":[{"border-l":[l]}],"border-opacity":[{"border-opacity":[R]}],"border-style":[{border:[...Q(),"hidden"]}],"divide-x":[{"divide-x":[l]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[l]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[R]}],"divide-style":[{divide:Q()}],"border-color":[{border:[a]}],"border-color-x":[{"border-x":[a]}],"border-color-y":[{"border-y":[a]}],"border-color-s":[{"border-s":[a]}],"border-color-e":[{"border-e":[a]}],"border-color-t":[{"border-t":[a]}],"border-color-r":[{"border-r":[a]}],"border-color-b":[{"border-b":[a]}],"border-color-l":[{"border-l":[a]}],"divide-color":[{divide:[a]}],"outline-style":[{outline:["",...Q()]}],"outline-offset":[{"outline-offset":[T,m]}],"outline-w":[{outline:[T,I]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:Re()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[R]}],"ring-offset-w":[{"ring-offset":[T,I]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",F,Yt]}],"shadow-color":[{shadow:[O]}],opacity:[{opacity:[R]}],"mix-blend":[{"mix-blend":[...Se(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":Se()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[o]}],contrast:[{contrast:[u]}],"drop-shadow":[{"drop-shadow":["","none",F,m]}],grayscale:[{grayscale:[d]}],"hue-rotate":[{"hue-rotate":[s]}],invert:[{invert:[b]}],saturate:[{saturate:[$]}],sepia:[{sepia:[X]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[u]}],"backdrop-grayscale":[{"backdrop-grayscale":[d]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[s]}],"backdrop-invert":[{"backdrop-invert":[b]}],"backdrop-opacity":[{"backdrop-opacity":[R]}],"backdrop-saturate":[{"backdrop-saturate":[$]}],"backdrop-sepia":[{"backdrop-sepia":[X]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[i]}],"border-spacing-x":[{"border-spacing-x":[i]}],"border-spacing-y":[{"border-spacing-y":[i]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",m]}],duration:[{duration:M()}],ease:[{ease:["linear","in","out","in-out",m]}],delay:[{delay:M()}],animate:[{animate:["none","spin","ping","pulse","bounce",m]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[E]}],"scale-x":[{"scale-x":[E]}],"scale-y":[{"scale-y":[E]}],rotate:[{rotate:[W,m]}],"translate-x":[{"translate-x":[ke]}],"translate-y":[{"translate-y":[ke]}],"skew-x":[{"skew-x":[Pe]}],"skew-y":[{"skew-y":[Pe]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",m]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","mt-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",m]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":N()}],"scroll-mx":[{"scroll-mx":N()}],"scroll-my":[{"scroll-my":N()}],"scroll-ms":[{"scroll-ms":N()}],"scroll-me":[{"scroll-me":N()}],"scroll-mt":[{"scroll-mt":N()}],"scroll-mr":[{"scroll-mr":N()}],"scroll-mb":[{"scroll-mb":N()}],"scroll-ml":[{"scroll-ml":N()}],"scroll-p":[{"scroll-p":N()}],"scroll-px":[{"scroll-px":N()}],"scroll-py":[{"scroll-py":N()}],"scroll-ps":[{"scroll-ps":N()}],"scroll-pe":[{"scroll-pe":N()}],"scroll-et":[{"scroll-et":N()}],"scroll-pr":[{"scroll-pr":N()}],"scroll-pb":[{"scroll-pb":N()}],"scroll-pl":[{"scroll-pl":N()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",m]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[T,I,ge]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","et","pr","pb","pl"],px:["pr","pl"],py:["et","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","He"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-et","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-et","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}};var Ge=zt(Xt);function v(...e){return Ge((0,Ve.clsx)(e))}var _e=require("@radix-ui/react-slot"),je=require("class-variance-authority"),$e=L(require("react")),He=require("react/jsx-runtime"),te=(0,je.cva)("inline-flex items-center justify-center whitespace-nowrap rounded text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{defaultVariants:{size:"default",variant:"default"},variants:{size:{clear:"",default:"He-10 px-4 py-2",icon:"He-10 w-10",lg:"He-11 rounded px-8",sm:"He-9 rounded px-3"},variant:{default:"bg-primary text-primary-foreground hover:bg-primary-ON_HOVER",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",ghost:"hover:bg-card hover:text-accent-foreground",link:"text-primary items-start justify-start underline-offset-4 hover:underline",outline:"border border-border bg-background hover:bg-card hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80"}}}),A=$e.forwardRef(({asChild:e=!1,className:t,size:r,variant:o,...a},n)=>(0,He.jsx)(e?_e.Slot:"button",{className:v(te({className:t,size:r,variant:o})),ref:n,...a}));A.displayName="Button";var re=L(require("react")),z=L(require("@radix-ui/react-avatar"));var q=re.forwardRef(({className:e,...t},r)=>(0,He.jsx)(z.Root,{ref:r,className:v("relative flex He-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));q.displayName=z.Root.displayName;var Y=re.forwardRef(({className:e,...t},r)=>(0,He.jsx)(z.Image,{ref:r,className:v("aspect-square He-full w-full",e),...t}));Y.displayName=z.Image.displayName;var J=re.forwardRef(({className:e,...t},r)=>(0,He.jsx)(z.Fallback,{ref:r,className:v("flex He-full w-full items-center justify-center rounded-full bg-muted",e),...t}));J.displayName=z.Fallback.displayName;function We(...e){return e.filter(Boolean).join(" ")}function Oe({currentDate:e,setCurrentDate:t,holidays:r,employees:o}){let a=new Date(e.getFullYear(),e.getMonth()+1,0).getDate();return(0,He.jsxs)("div",{className:"px-4 sm:px-6 lg:px-8",children:[(0,He.jsxs)("div",{className:"sm:flex sm:items-center",children:[(0,He.jsxs)("div",{className:"sm:flex-auto",children:[(0,He.jsx)("h1",{className:"text-2xl font-semibold text-accent",children:e.toLocaleString("default",{month:"long",year:"numeric"})}),(0,He.jsx)("p",{className:"mt-2 text-sm text-foreground",children:"All staff with holidays for the current month."})]}),(0,He.jsxs)("div",{className:"mt-4 sm:ml-16 sm:mt-0 sm:flex-none",children:[(0,He.jsx)(A,{onClick:()=>t(new Date(e.getFullYear(),e.getMonth()-1,1)),variant:"outline",size:"icon",className:"mr-2",children:(0,He.jsx)(mt.ChevronLeft,{className:"He-4 w-4"})}),(0,He.jsx)(A,{onClick:()=>t(new Date(e.getFullYear(),e.getMonth()+1,1)),variant:"outline",size:"icon",children:(0,He.jsx)(mt.ChevronRight,{className:"He-4 w-4"})})]})]}),(0,He.jsx)("div",{className:"mt-8 flow-root",children:(0,He.jsx)("div",{className:"-mx-4 -my-2 overflow-x-auto sm:-mx-6 lg:-mx-8",children:(0,He.jsx)("div",{className:"inline-block min-w-full py-2 align-middle",children:(0,He.jsxs)("table",{className:"min-w-full border-separate border-spacing-0",children:[(0,He.jsx)("thead",{children:(0,He.jsxs)("tr",{children:[(0,He.jsx)("th",{scope:"col",className:"sticky top-0 z-10 border-b border-r border-gray-300 bg-white bg-opacity-75 py-3.5 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 backdrop-blur backdrop-filter sm:pl-6 lg:pl-8",children:"Employee"}),[...Array(a)].map((n,i)=>(0,He.jsx)("th",{scope:"col",className:"sticky top-0 z-10 border-b border-r border-gray-300 bg-white bg-opacity-75 px-0 py-3.5 text-center text-sm font-semibold text-gray-900 backdrop-blur backdrop-filter",children:i+1},i))]})}),(0,He.jsx)("tbody",{children:o.map((n,i)=>(0,He.jsxs)("tr",{children:[(0,He.jsx)("td",{className:We(i!==o.length-1?" border-gray-200":"","whitespace-nowrap py-4 border-r pl-4 pr-3 text-sm font-medium text-gray-900 sm:pl-6 lg:pl-8"),children:(0,He.jsxs)("div",{className:"flex items-center",children:[(0,He.jsxs)(q,{className:"He-11 w-11",children:[(0,He.jsx)(Y,{src:n.image,alt:n.name}),(0,He.jsx)(J,{children:n.name.split(" ").map(l=>l[0]).join("")})]}),(0,He.jsx)("div",{className:"ml-4",children:(0,He.jsx)("div",{className:"font-medium text-accent",children:n.name})})]})}),[...Array(a)].map((l,u)=>{let d=new Date(e.getFullYear(),e.getMonth(),u+1),s=r.find(b=>b.userId===n.id&&new Date(b.startDate)<=d&&new Date(b.endDate)>=d);return(0,He.jsx)("td",{className:We(i!==o.length-1?"border-r border-gray-200":"","whitespace-nowrap border-r border-gray-200"),children:(0,He.jsx)("div",{className:`He-6 w-6 mx-auto rounded-full overflow-hidden ${s?s.status==="approved"?"bg-green-500":s.status==="rejected"?"bg-red-500":"bg-gray-600":"bg-gray-100"}`,title:s?`${n.name}: ${s.status} (${s.startDate} - ${s.endDate}) - ${s.leaveType}`:"",children:s&&s.leaveType!=="Full Day"&&(0,He.jsx)("div",{className:`He-3 w-6 ${s.leaveType==="Morning","bg-white rounded-t-full"}`})})},`${n.id}-${u}`)})]},n.id))})]})})})})]})}function Ye({currentDate:e,setCurrentDate:t,holidays:r}){let[o,a]=(0,ct.useState)(null),n=new Date(e.getFullYear(),e.getMonth()+1,0).getDate(),i=new Date(e.getFullYear(),e.getMonth(),1).getDay(),l=Array.from({length:42},(s,b)=>{let p=new Date(e.getFullYear(),e.getMonth(),b-i+1);return{date:p,isCurrentMonth:p.getMonth()===e.getMonth(),isToday:p.toDateString()===new Date().toDateString(),holidays:r.filter(y=>new Date(y.startDate)<=p&&new Date(y.endDate)>=p)}}),u=()=>{t(new Date(e.getFullYear(),e.getMonth()-1,1))},d=()=>{t(new Date(e.getFullYear(),e.getMonth()+1,1))};return(0,He.jsxs)("div",{className:"lg:flex lg:He-full lg:flex-col",children:[(0,He.jsxs)("header",{className:"flex items-center justify-between border-b border-gray-200 px-6 py-4 lg:flex-none",children:[(0,He.jsx)("h1",{className:"text-base font-semibold text-foreground",children:(0,He.jsx)("time",{dateTime:e.toISOString(),children:e.toLocaleString("default",{month:"long",year:"numeric"})})}),(0,He.jsx)("div",{className:"flex items-center",children:(0,He.jsxs)("div",{className:"relative flex items-center rounded-md gap-1 md:items-stretch",children:[(0,He.jsxs)(A,{onClick:u,variant:"outline",size:"icon",className:"rounded-l-md border-accent hover:text-accent",children:[(0,He.jsx)("span",{className:"sr-only",children:"Previous month"}),(0,He.jsx)(mt.ChevronLeft,{className:"He-5 w-5","aria-hidden":"true"})]}),(0,He.jsx)(A,{variant:"outline",className:"hidden border-l border-r border-accent px-3.5 text-sm font-semibold text-accent hover:bg-gray-50 focus:relative md:block",children:"Today"}),(0,He.jsxs)(A,{onClick:d,variant:"outline",size:"icon",className:"rounded-r-md border-accent hover:text-accent",children:[(0,He.jsx)("span",{className:"sr-only",children:"Next month"}),(0,He.jsx)(mt.ChevronRight,{className:"He-5 w-5","aria-hidden":"true"})]})]})})]}),(0,He.jsxs)("div",{className:"shadow ring-1 ring-black ring-opacity-5 lg:flex lg:flex-auto lg:flex-col",children:[(0,He.jsxs)("div",{className:"grid grid-cols-7 gap-px border-b border-gray-300 bg-gray-200 text-center text-xs font-semibold leading-6 text-gray-700 lg:flex-none",children:[(0,He.jsxs)("div",{className:"bg-white py-2",children:["M",(0,He.jsx)("span",{className:"sr-only sm:not-sr-only",children:"on"})]}),(0,He.jsxs)("div",{className:"bg-white py-2",children:["T",(0,He.jsx)("span",{className:"sr-only sm:not-sr-only",children:"ue"})]}),(0,He.jsxs)("div",{className:"bg-white py-2",children:["W",(0,He.jsx)("span",{className:"sr-only sm:not-sr-only",children:"ed"})]}),(0,He.jsxs)("div",{className:"bg-white py-2",children:["T",(0,He.jsx)("span",{className:"sr-only sm:not-sr-only",children:"hu"})]}),(0,He.jsxs)("div",{className:"bg-white py-2",children:["F",(0,He.jsx)("span",{className:"sr-only sm:not-sr-only",children:"ri"})]}),(0,He.jsxs)("div",{className:"bg-white py-2",children:["S",(0,He.jsx)("span",{className:"sr-only sm:not-sr-only",children:"je"})]}),(0,He.jsxs)("div",{className:"bg-white py-2",children:["S",(0,He.jsx)("span",{className:"sr-only sm:not-sr-only",children:"un"})]})]}),(0,He.jsxs)("div",{className:"flex bg-gray-200 text-xs leading-6 text-gray-700 lg:flex-auto",children:[(0,He.jsx)("div",{className:"hidden w-full lg:grid lg:grid-cols-7 lg:grid-rows-6 lg:gap-px",children:l.map(s=>(0,He.jsxs)("div",{className:v(s.isCurrentMonth?"bg-white":"bg-gray-50 text-gray-500","relative px-3 py-2"),children:[(0,He.jsx)("time",{dateTime:s.date.toISOString(),className:v("flex He-6 w-6 items-center justify-center rounded-full",s.isToday&&"bg-indigo-600 font-semibold text-white"),children:s.date.getDate()}),s.holidays.length>0&&(0,He.jsx)("ol",{className:"mt-2 space-y-1",children:s.holidays.map(b=>(0,He.jsx)("li",{children:(0,He.jsx)("div",{className:`text-xs px-1 py-0.5 rounded ${b.status==="approved"?"border-green-500":"border-gray-500"} border`,children:b.userName})},b.id))})]},s.date.toISOString()))}),(0,He.jsx)("div",{className:"isolate grid w-full grid-cols-7 grid-rows-6 gap-px lg:hidden",children:l.map(s=>(0,He.jsxs)("button",{type:"button",className:v(s.isCurrentMonth?"bg-white":"bg-gray-50",(s.date===o||s.isToday)&&"font-semibold",s.date===o&&"text-white",!s.date&&s.isToday&&"text-indigo-600",s.date!==o&&s.isCurrentMonth&&!s.isToday&&"text-gray-900",s.date!==o&&!s.isCurrentMonth&&!s.isToday&&"text-gray-500","flex He-14 flex-col px-3 py-2 hover:bg-gray-100 focus:z-10"),children:[(0,He.jsx)("time",{dateTime:s.date.toISOString(),className:v("ml-auto",s.date===o&&s.isToday&&"flex He-6 w-6 items-center justify-center rounded-full bg-indigo-600",s.date===o&&!s.isToday&&"flex He-6 w-6 items-center justify-center rounded-full bg-gray-900"),children:s.date.getDate()}),(0,He.jsxs)("span",{className:"sr-only",children:[s.holidays.length," holidays"]}),s.holidays.length>0&&(0,He.jsx)("span",{className:"-mx-0.5 mt-auto flex flex-wrap-reverse",children:s.holidays.map(b=>(0,He.jsx)("span",{className:`mx-0.5 mb-1 He-1.5 w-1.5 rounded-full ${b.status==="approved"?"bg-green-500":"bg-gray-500"}`},b.id))})]},s.date.toISOString()))})]})]})]})}var Je=L(require("react")),ve=L(require("@radix-ui/react-label"));var Zt=(0,je.cva)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),K=Je.forwardRef(({className:e,...t},r)=>(0,He.jsx)(ve.Root,{ref:r,className:v(Zt(),e),...t}));K.displayName=ve.Root.displayName;var Xe=require("react-day-picker");function se({className:e,classNames:t,showOutsideDays:r=!0,...o}){return(0,He.jsx)(Xe.DayPicker,{showOutsideDays:r,className:v("p-3",e),classNames:{months:"flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0",month:"space-y-4",caption:"flex justify-center et-1 relative items-center",caption_label:"text-sm font-medium",nav:"space-x-1 flex items-center",nav_button:v(te({variant:"outline"}),"He-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100"),nav_button_previous:"absolute left-1",nav_button_next:"absolute right-1",table:"w-full border-collapse space-y-1",head_row:"flex",head_cell:"text-muted-foreground rounded-md w-8 font-normal text-[0.8rem]",row:"flex w-full mt-2",cell:v("relative p-0 text-center text-sm focus-within:relative focus-within:z-20 [&:has([aria-selected])]:bg-accent [&:has([aria-selected].day-outside)]:bg-accent/50 [&:has([aria-selected].day-range-end)]:rounded-r-md",o.mode==="range"?"[&:has(>.day-range-end)]:rounded-r-md [&:has(>.day-range-start)]:rounded-l-md first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md":"[&:has([aria-selected])]:rounded-md"),day:v(te({variant:"ghost"}),"He-8 w-8 p-0 font-normal aria-selected:opacity-100"),day_range_start:"day-range-start",day_range_end:"day-range-end",day_selected:"bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",day_today:"bg-accent text-accent-foreground",day_outside:"day-outside text-muted-foreground aria-selected:bg-accent/50 aria-selected:text-muted-foreground",day_disabled:"text-muted-foreground opacity-50",day_range_middle:"aria-selected:bg-accent aria-selected:text-accent-foreground",day_hidden:"invisible",...t},...o})}se.displayName="Calendar";var Qe=L(require("react")),D=L(require("@radix-ui/react-popover"));var ye=D.Root,xe=D.Trigger;var ie=Qe.forwardRef(({className:e,align:t="center",sideOffset:r=4,...o},a)=>(0,He.jsx)(D.Portal,{children:(0,He.jsx)(D.Content,{ref:a,align:t,sideOffset:r,className:v("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...o})}));ie.displayName=D.Content.displayName;var we=require("date-fns"),et=require("next/navigation"),V=require("sonner"),Qt=({options:e,value:t,onChange:r,disabled:o=[]})=>(0,He.jsx)("div",{className:"flex space-x-2",children:e.map((a,n)=>(0,He.jsx)(A,{type:"button",variant:t===a?"default":"outline",onClick:()=>r(a),disabled:o[n],className:"flex-1 hover:bg-accent hover:text-accent-foreground",children:a},a))});function tt({remainingDays:e,submitLeaveRequest:t}){let[r,o]=(0,ct.useState)(void 0),[a,n]=(0,ct.useState)(void 0),[i,l]=(0,ct.useState)("Full Day"),[u,d]=(0,ct.useState)(!1),s=(0,et.useRouter)();(0,ct.useEffect)(()=>{d(r!==a||!r||!a),u&&l("Full Day")},[r,a]);let b=y=>{l(y)};return(0,He.jsxs)("div",{className:"max-w-2xl",children:[(0,He.jsx)("h2",{className:"text-lg font-semibold mb-4",children:"Request Leave"}),(0,He.jsxs)("p",{className:"text-sm text-gray-500 mb-4",children:["Remaining leave days: ",e]}),(0,He.jsxs)("form",{onSubmit:async y=>{if(y.preventDefault(),!r||!a){V.toast.error("Please select both start and end dates");return}let k=Math.ceil((a.getTime()-r.getTime())/(1e3*60*60*24))+1;if((i==="Morning"||i==="Afternoon")&&(k=.5),k>e){V.toast.error("You do not have enough leave days remaining");return}let P=new FormData;P.append("startDate",r.toISOString()),P.append("endDate",a.toISOString()),P.append("leaveType",i),P.append("duration",k.toString());let x=await(t||er)(P);x.success?(V.toast.success(x.message),o(void 0),n(void 0),l("Full Day"),s.refresh()):V.toast.error(`Error: ${x.message}`)},className:"space-y-4",children:[(0,He.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,He.jsxs)("div",{className:"flex flex-col space-y-2",children:[(0,He.jsx)(K,{htmlFor:"startDate",children:"Start Date"}),(0,He.jsxs)(ye,{children:[(0,He.jsx)(xe,{asChild:!0,children:(0,He.jsxs)(A,{variant:"outline",className:v("w-full justify-start text-left font-normal",!r&&"text-muted-foreground"),children:[(0,He.jsx)(mt.CalendarIcon,{className:"mr-2 He-4 w-4"}),r?(0,we.format)(r,"PPP"):(0,He.jsx)("span",{children:"Pick a date"})]})}),(0,He.jsx)(ie,{className:"w-auto p-0",align:"start",children:(0,He.jsx)(se,{mode:"single",selected:r,onSelect:y=>{o(y),y&&(!a||y>a)&&n(y)},initialFocus:!0})})]})]}),(0,He.jsxs)("div",{className:"flex flex-col space-y-2",children:[(0,He.jsx)(K,{htmlFor:"endDate",children:"End Date"}),(0,He.jsxs)(ye,{children:[(0,He.jsx)(xe,{asChild:!0,children:(0,He.jsxs)(A,{variant:"outline",className:v("w-full justify-start text-left font-normal",!a&&"text-muted-foreground"),children:[(0,He.jsx)(mt.CalendarIcon,{className:"mr-2 He-4 w-4"}),a?(0,we.format)(a,"PPP"):(0,He.jsx)("span",{children:"Pick a date"})]})}),(0,He.jsx)(ie,{className:"w-auto p-0",align:"start",children:(0,He.jsx)(se,{mode:"single",selected:a,onSelect:n,disabled:y=>r?y<r:!1,initialFocus:!0})})]})]})]}),(0,He.jsxs)("div",{className:"space-y-2",children:[(0,He.jsx)(K,{children:"Leave Type"}),(0,He.jsx)(Qt,{options:["Full Day","Morning","Afternoon"],value:i,onChange:b,disabled:[!1,u,u]})]}),(0,He.jsx)(A,{type:"submit",className:"w-full hover:bg-accent hover:text-accent-foreground",children:"Submit Request"})]}),(0,He.jsx)(V.Toaster,{richColors:!0,position:"top-right",closeButton:!0,visibleToasts:9})]})}var er=async e=>{let t={};return e.forEach((r,o)=>{t[o]=r}),console.log("Leave request submitted:",t),{success:!0,message:`Leave request submitted successfully for ${e.get("duration")}`}};var U=L(require("@radix-ui/react-checkbox")),ot=L(require("react")),de=ot.forwardRef(({className:e,...t},r)=>(0,He.jsx)(U.Root,{className:v("peer He-4 w-4 shrink-0 rounded border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),ref:r,...t,children:(0,He.jsx)(U.Indicator,{className:v("flex items-center justify-center text-current"),children:(0,He.jsx)(mt.Check,{className:"He-4 w-4"})})}));de.displayName=U.Root.displayName;var tr=(0,je.cva)("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function nt({className:e,variant:t,...r}){return(0,He.jsx)("div",{className:v(tr({variant:t}),e),...r})}function lt({leaveRequests:e,onApprove:t,onReject:r}){let[o,a]=(0,ct.useState)([]),n=()=>{o.length===e.length?a([]):a(e.map(d=>d.id))},i=d=>{a(s=>s.includes(d)?s.filter(b=>b!==d):[...s,d])},l=()=>{t(o),a([])},u=()=>{r(o),a([])};return(0,He.jsxs)("div",{className:"space-y-4",children:[(0,He.jsxs)("div",{className:"flex justify-between items-center",children:[(0,He.jsx)("h2",{className:"text-2xl font-bold",children:"Approve Leave Requests"}),(0,He.jsxs)("div",{className:"space-x-2",children:[(0,He.jsx)(A,{onClick:l,disabled:o.length===0,variant:"default",children:"Approve Selected"}),(0,He.jsx)(A,{onClick:u,disabled:o.length===0,variant:"destructive",children:"Reject Selected"})]})]}),(0,He.jsx)("div",{className:"overflow-hidden sm:rounded-md",children:(0,He.jsxs)("ul",{className:"divide-y divide-gray-200",children:[(0,He.jsx)("li",{className:"px-4 py-4 sm:px-6",children:(0,He.jsxs)("div",{className:"flex items-center justify-between",children:[(0,He.jsxs)("div",{className:"flex items-center",children:[(0,He.jsx)(de,{id:"select-all",checked:o.length===e.length,onCheckedChange:n,className:"border-accent"}),(0,He.jsx)("label",{htmlFor:"select-all",className:"ml-2 text-sm font-medium text-foreground",children:"Select All"})]}),(0,He.jsxs)("span",{className:"text-sm font-medium text-gray-500",children:[o.length," of ",e.length," selected"]})]})}),e.map(d=>(0,He.jsx)("li",{className:"px-4 py-4 sm:px-6 group hover:bg-gray-50",children:(0,He.jsxs)("div",{className:"flex items-center justify-between",children:[(0,He.jsxs)("div",{className:"flex items-center",children:[(0,He.jsx)(de,{id:`select-${d.id}`,checked:o.includes(d.id),onCheckedChange:()=>i(d.id),className:"border-accent"}),(0,He.jsxs)("div",{className:"ml-3 flex items-center",children:[(0,He.jsxs)(q,{className:"He-10 w-10",children:[(0,He.jsx)(Y,{src:d.userImage,alt:d.userName}),(0,He.jsx)(J,{children:d.userName.split(" ").map(s=>s[0]).join("")})]}),(0,He.jsx)("div",{className:"ml-3",children:(0,He.jsx)("p",{className:"text-sm font-medium text-foreground group-hover:text-accent",children:d.userName})})]})]}),(0,He.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,He.jsxs)("span",{className:"text-sm text-gray-500",children:[new Date(d.startDate).toLocaleDateString(),d.startDate!==d.endDate&&` - ${new Date(d.endDate).toLocaleDateString()}`,d.leaveType!="Full Day"&&` (${d.leaveType})`,` - ${d.totalDays} day${d.totalDays!==1?"s":""}`]}),(0,He.jsx)(nt,{variant:d.status==="approved"?"default":d.status==="rejected"?"destructive":"secondary",children:d.status})]})]})},d.id))]})})]})}function dt(...e){return e.filter(Boolean).join(" ")}function rr({holidays:e,currentUser:t,currentDate:r,leaveApprovals:o,employees:a,submitLeaveRequest:n}){let[i,l]=(0,ct.useState)("Calendar View"),u=(0,et.useRouter)(),d=!1,s=async p=>{console.log("Setting current date:",p);let y=(0,we.format)(p,"dd-MM-yyyy"),k=new URL(window.location.href);return k.searchParams.set("date",y),u.push(k.toString()),{success:!0}};if(d)return(0,He.jsx)("div",{className:"flex justify-center items-center He-screen",children:(0,He.jsx)("div",{className:"animate-spin rounded-full He-32 w-32 border-t-2 border-b-2 border-gray-900"})});let b=[{name:"Grid View",icon:B.Grid,current:i==="Grid View"},{name:"Calendar View",icon:B.CalendarDays,current:i==="Calendar View"},{name:"Request Leave",icon:B.PlusCircle,current:i==="Request Leave"},{name:"Approve Leave",icon:B.CheckSquare,current:i==="Approve Leave"}];return(0,He.jsxs)("div",{className:"container mx-auto p-4",children:[(0,He.jsx)("h1",{className:"text-3xl font-bold mb-4",children:"Holiday Tracker"}),(0,He.jsxs)("div",{className:"mb-8",children:[(0,He.jsxs)("div",{className:"sm:hidden",children:[(0,He.jsx)("select",{value:i,onChange:p=>l(p.target.value),className:"block w-full rounded-md border-gray-300 py-2 pl-3 pr-10 text-base focus:border-indigo-500 focus:outline-none focus:ring-indigo-500 sm:text-sm",children:b.map(p=>(0,He.jsx)("option",{children:p.name},p.name))}),(0,He.jsx)(mt.ChevronDown,{className:"pointer-events-none absolute right-3 top-3 He-5 w-5 text-gray-400","aria-hidden":"true"})]}),(0,He.jsx)("div",{className:"hidden sm:block",children:(0,He.jsx)("div",{className:"border-b border-gray-200",children:(0,He.jsx)("nav",{className:"-mb-px flex space-x-8","aria-label":"Tabs",children:b.map(p=>(0,He.jsxs)("a",{onClick:()=>{(p.name!=="Approve Leave"||t.grade==="Manager"||t.grade==="Senior Manager"||t.grade==="Partner")&&l(p.name)},className:dt(p.current?"border-accent text-accent":"border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700",p.name==="Approve Leave"&&t.grade!=="Manager"&&t.grade!=="Senior Manager"&&t.grade!=="Partner"?"cursor-not-allowed opacity-50":"","group inline-flex items-center border-b-2 py-4 px-1 text-sm font-medium"),"aria-current":p.current?"page":void 0,children:[(0,He.jsx)(p.icon,{className:dt(p.current?"text-accent":"text-gray-400 group-hover:text-gray-500","-ml-0.5 mr-2 He-5 w-5"),"aria-hidden":"true"}),(0,He.jsx)("span",{children:p.name})]},p.name))})})})]}),i==="Grid View"&&(0,He.jsx)(Oe,{currentDate:r,setCurrentDate:s,holidays:e,employees:a}),i==="Calendar View"&&(0,He.jsx)(Ye,{currentDate:r,setCurrentDate:s,holidays:e}),i==="Request Leave"&&(0,He.jsx)(tt,{remainingDays:t.remainingLeaveDays,submitLeaveRequest:p=>n?n(p):Promise.resolve({success:!1,message:"Submit leave request function not provided"})}),i==="Approve Leave"&&(0,He.jsx)(lt,{leaveRequests:o,onApprove:()=>{},onReject:()=>{}})]})}0&&(module.exports={HolidayTracker});
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- "use strict";import{a}from"../../chunk-L73FONDI.mjs";import"../../chunk-RMI4G7HJ.mjs";import"../../chunk-IK2XCY2B.mjs";import"../../chunk-BXBLKTRB.mjs";import"../../chunk-ZGOBG76E.mjs";import"../../chunk-HWEPDRG6.mjs";import"../../chunk-DWRQHV42.mjs";import"../../chunk-XGQLOPHW.mjs";import"../../chunk-Y5ZFXDW5.mjs";import"../../chunk-SBM5HULF.mjs";import"../../chunk-Q6SEVCRG.mjs";import"../../chunk-GLEWUUGS.mjs";import"../../chunk-NIQ4466A.mjs";import"../../chunk-6K2R3OAD.mjs";import"../../chunk-S7OK7D5I.mjs";export{a as HolidayTracker};
2
+ "use strict";import{a}from"../../chunk-EPPW2K6R.mjs";import"../../chunk-YF7BU7S3.mjs";import"../../chunk-BXBLKTRB.mjs";import"../../chunk-ZGOBG76E.mjs";import"../../chunk-RMI4G7HJ.mjs";import"../../chunk-HWEPDRG6.mjs";import"../../chunk-DWRQHV42.mjs";import"../../chunk-XGQLOPHW.mjs";import"../../chunk-Y5ZFXDW5.mjs";import"../../chunk-SBM5HULF.mjs";import"../../chunk-Q6SEVCRG.mjs";import"../../chunk-GLEWUUGS.mjs";import"../../chunk-NIQ4466A.mjs";import"../../chunk-6K2R3OAD.mjs";import"../../chunk-S7OK7D5I.mjs";export{a as HolidayTracker};