cortex-react-components 2.29.0-beta.4 → 2.29.0-beta.5

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 (205) hide show
  1. package/dist/{chunk-DNZWIOML.mjs → chunk-23KBAZ3A.mjs} +1 -1
  2. package/dist/{chunk-VRE6VCHX.mjs → chunk-2BR55L74.mjs} +1 -1
  3. package/dist/{chunk-2W5UZALU.mjs → chunk-2F3PWPVH.mjs} +1 -1
  4. package/dist/{chunk-RR4QSUV2.mjs → chunk-2IMY4VWR.mjs} +1 -1
  5. package/dist/{chunk-CMEGGDTF.mjs → chunk-2OX6LDDB.mjs} +1 -1
  6. package/dist/{chunk-T46EPXCV.mjs → chunk-2PHIGOJD.mjs} +1 -1
  7. package/dist/{chunk-6MFAWZRQ.mjs → chunk-2WASC4CJ.mjs} +1 -1
  8. package/dist/{chunk-NCHC4HCU.mjs → chunk-3765FO7Q.mjs} +1 -1
  9. package/dist/{chunk-IQQ7ZWCP.mjs → chunk-3MZC4LZP.mjs} +1 -1
  10. package/dist/{chunk-76U5MXTI.mjs → chunk-3R4ESOSM.mjs} +1 -1
  11. package/dist/{chunk-NK3XCHIN.mjs → chunk-4OC7VVBA.mjs} +1 -1
  12. package/dist/{chunk-GMLLRSAH.mjs → chunk-5GHKXLL2.mjs} +1 -1
  13. package/dist/chunk-6A3V5BMY.mjs +3 -0
  14. package/dist/{chunk-E4QGOITF.mjs → chunk-A6INQL3D.mjs} +1 -1
  15. package/dist/{chunk-ZI77NERP.mjs → chunk-AE22EADM.mjs} +1 -1
  16. package/dist/{chunk-JJSIBEFX.mjs → chunk-AFWCGPWL.mjs} +1 -1
  17. package/dist/{chunk-5NIEZE7A.mjs → chunk-AGWQ5S2Z.mjs} +1 -1
  18. package/dist/{chunk-SKTNOZL2.mjs → chunk-AZ4L74IK.mjs} +1 -1
  19. package/dist/{chunk-EDTWODQF.mjs → chunk-B3XGJ6ZE.mjs} +1 -1
  20. package/dist/{chunk-G4S2QIU4.mjs → chunk-BAR6C7TR.mjs} +1 -1
  21. package/dist/{chunk-AJ7A2ZQ3.mjs → chunk-BJ4PT44N.mjs} +1 -1
  22. package/dist/{chunk-ABWLO5GA.mjs → chunk-BYZHOMNP.mjs} +1 -1
  23. package/dist/{chunk-IXCX7SAL.mjs → chunk-C2MKUCGW.mjs} +1 -1
  24. package/dist/{chunk-AQQCH7Z2.mjs → chunk-CNCT3JZV.mjs} +1 -1
  25. package/dist/{chunk-BQJDTDBP.mjs → chunk-CUVUHOBI.mjs} +1 -1
  26. package/dist/{chunk-CDVRH3MC.mjs → chunk-D44OXIPN.mjs} +1 -1
  27. package/dist/{chunk-2FHOBKU5.mjs → chunk-DDISU7MD.mjs} +1 -1
  28. package/dist/{chunk-UE66RIJN.mjs → chunk-EKN35OCW.mjs} +1 -1
  29. package/dist/{chunk-I75BFMO7.mjs → chunk-ESDGVG7N.mjs} +1 -1
  30. package/dist/{chunk-IP5TOSWC.mjs → chunk-EXKTW5PC.mjs} +1 -1
  31. package/dist/{chunk-S3R55V74.mjs → chunk-FPPA6M6A.mjs} +1 -1
  32. package/dist/{chunk-SG5BHIQF.mjs → chunk-FQ56UUMT.mjs} +1 -1
  33. package/dist/{chunk-LFXMB6YE.mjs → chunk-GEPYRPWO.mjs} +1 -1
  34. package/dist/{chunk-P5Q2KBKF.mjs → chunk-GT4Z7A36.mjs} +1 -1
  35. package/dist/{chunk-NBWQTY4K.mjs → chunk-HCOFGI23.mjs} +1 -1
  36. package/dist/{chunk-XTUH2DJE.mjs → chunk-HQSF6B4Y.mjs} +1 -1
  37. package/dist/{chunk-TEJHZXUT.mjs → chunk-IDAR2QUA.mjs} +1 -1
  38. package/dist/{chunk-G5UB3YKZ.mjs → chunk-JWNXNIO4.mjs} +1 -1
  39. package/dist/{chunk-Z5W2WY26.mjs → chunk-KBFRFIHJ.mjs} +1 -1
  40. package/dist/{chunk-CKJEMPZR.mjs → chunk-L3ICD2EI.mjs} +1 -1
  41. package/dist/{chunk-ZPJJOZY4.mjs → chunk-LV23ARQV.mjs} +1 -1
  42. package/dist/{chunk-RKLOWJVN.mjs → chunk-LZVWXI54.mjs} +1 -1
  43. package/dist/{chunk-DZDMH6IZ.mjs → chunk-N4GZJH6H.mjs} +1 -1
  44. package/dist/{chunk-4KVVVRGU.mjs → chunk-NMHAXHKJ.mjs} +1 -1
  45. package/dist/{chunk-MIM3VFET.mjs → chunk-NOQV2M2B.mjs} +1 -1
  46. package/dist/{chunk-CTDGP5H4.mjs → chunk-OM3GMTI3.mjs} +1 -1
  47. package/dist/{chunk-RIRZRO6U.mjs → chunk-P55W6AFU.mjs} +1 -1
  48. package/dist/{chunk-GPXPR7VT.mjs → chunk-PPZB3BIS.mjs} +1 -1
  49. package/dist/{chunk-JMJUFHDA.mjs → chunk-PTRLJGWG.mjs} +1 -1
  50. package/dist/{chunk-ZFUP5NVF.mjs → chunk-PXLSH6S2.mjs} +1 -1
  51. package/dist/{chunk-RK5JHVD4.mjs → chunk-Q3F3NCXM.mjs} +1 -1
  52. package/dist/{chunk-CGL3R3BQ.mjs → chunk-R66Z2H6V.mjs} +1 -1
  53. package/dist/{chunk-QLKS32RD.mjs → chunk-REF6QD43.mjs} +1 -1
  54. package/dist/{chunk-S3OBSLA5.mjs → chunk-RJGEVXIX.mjs} +1 -1
  55. package/dist/{chunk-T5HJS6OF.mjs → chunk-RSDUFAIB.mjs} +1 -1
  56. package/dist/{chunk-KOLP657S.mjs → chunk-RUMNILUG.mjs} +1 -1
  57. package/dist/{chunk-WLI2YTOQ.mjs → chunk-RWVEYOUL.mjs} +1 -1
  58. package/dist/{chunk-4745QCXP.mjs → chunk-SCTFNADH.mjs} +1 -1
  59. package/dist/{chunk-7GWTDITT.mjs → chunk-SYFFDRTC.mjs} +1 -1
  60. package/dist/{chunk-FNOAYUJ3.mjs → chunk-TPS5MBQJ.mjs} +1 -1
  61. package/dist/{chunk-R7YCUNIS.mjs → chunk-UV4BI6Z2.mjs} +1 -1
  62. package/dist/{chunk-ZGDSCGLC.mjs → chunk-VCKKDEC5.mjs} +1 -1
  63. package/dist/{chunk-FJ4JWNKL.mjs → chunk-VQW6XFMO.mjs} +1 -1
  64. package/dist/{chunk-QPGVTPZ4.mjs → chunk-VXBNQCXP.mjs} +1 -1
  65. package/dist/{chunk-3DXSTAQP.mjs → chunk-VYRUKO6X.mjs} +1 -1
  66. package/dist/{chunk-V7PGZR23.mjs → chunk-WII6OSS7.mjs} +1 -1
  67. package/dist/{chunk-UZSBX5GO.mjs → chunk-X3JZSN3W.mjs} +1 -1
  68. package/dist/{chunk-VNYUNZ3M.mjs → chunk-XGIYNUGC.mjs} +1 -1
  69. package/dist/{chunk-HOKWKEDE.mjs → chunk-XNLTHAQ7.mjs} +1 -1
  70. package/dist/{chunk-4AACW32B.mjs → chunk-YJNUFYR6.mjs} +1 -1
  71. package/dist/{chunk-IKVDX3WJ.mjs → chunk-YLUMGWDF.mjs} +1 -1
  72. package/dist/{chunk-OK7X567A.mjs → chunk-ZBS7VPOI.mjs} +1 -1
  73. package/dist/{chunk-HDLKX5L3.mjs → chunk-ZW24FGHA.mjs} +1 -1
  74. package/dist/components/AdvancedComponents/AppSidebar.mjs +1 -1
  75. package/dist/components/AdvancedComponents/app-header.mjs +1 -1
  76. package/dist/components/AdvancedComponents/index.mjs +1 -1
  77. package/dist/components/Blocks/Banner.mjs +1 -1
  78. package/dist/components/Blocks/CallToAction.mjs +1 -1
  79. package/dist/components/Blocks/CollapsibleArea.mjs +1 -1
  80. package/dist/components/Blocks/Content.mjs +1 -1
  81. package/dist/components/Blocks/FeaturesBlock.mjs +1 -1
  82. package/dist/components/Blocks/ImageBlock.mjs +1 -1
  83. package/dist/components/Blocks/MediaBlock.mjs +1 -1
  84. package/dist/components/Blocks/RelatedPosts.mjs +1 -1
  85. package/dist/components/Blocks/RenderBlocks.mjs +1 -1
  86. package/dist/components/Blocks/ReusableContentBlock.mjs +1 -1
  87. package/dist/components/Blocks/index.mjs +1 -1
  88. package/dist/components/CRM/CogeBoard.mjs +1 -1
  89. package/dist/components/CRM/DealDetails.mjs +1 -1
  90. package/dist/components/CRM/KanbanBoard.mjs +1 -1
  91. package/dist/components/CRM/NewCustomerForm.mjs +1 -1
  92. package/dist/components/CRM/NewDealForm.mjs +1 -1
  93. package/dist/components/CRM/index.mjs +1 -1
  94. package/dist/components/Cards/ContentCard.mjs +1 -1
  95. package/dist/components/Cards/EventCard.js +1 -1
  96. package/dist/components/Cards/EventCard.mjs +1 -1
  97. package/dist/components/Cards/FeatureCard.mjs +1 -1
  98. package/dist/components/Cards/index.js +1 -1
  99. package/dist/components/Cards/index.mjs +1 -1
  100. package/dist/components/Chat/CopilotInterface.mjs +1 -1
  101. package/dist/components/Chat/demo-long-messages.mjs +1 -1
  102. package/dist/components/Chat/demo-tests.mjs +1 -1
  103. package/dist/components/Chat/demo.mjs +1 -1
  104. package/dist/components/Chat/example-usage.mjs +1 -1
  105. package/dist/components/Chat/example-with-vercel-ai.mjs +1 -1
  106. package/dist/components/Chat/index.mjs +1 -1
  107. package/dist/components/DigitalColleagues/AppSidebarLeft.mjs +1 -1
  108. package/dist/components/DigitalColleagues/DigitalColleageusLayout.mjs +1 -1
  109. package/dist/components/DigitalColleagues/MainPage.mjs +1 -1
  110. package/dist/components/DigitalColleagues/Pages/dashboardpage.mjs +1 -1
  111. package/dist/components/DigitalColleagues/Views/ColleaguesView.mjs +1 -1
  112. package/dist/components/DigitalColleagues/Views/KnowledgeView.mjs +1 -1
  113. package/dist/components/DigitalColleagues/Views/index.mjs +1 -1
  114. package/dist/components/DigitalColleagues/colleague-form.mjs +1 -1
  115. package/dist/components/DigitalColleagues/index.mjs +1 -1
  116. package/dist/components/DigitalColleagues/knowledge-browser.mjs +1 -1
  117. package/dist/components/DigitalColleagues/knowledge-search.mjs +1 -1
  118. package/dist/components/Foundary/AppSidebarLeft.mjs +1 -1
  119. package/dist/components/Foundary/Knowledge/add-knowledge-modal.mjs +1 -1
  120. package/dist/components/Foundary/Knowledge/add-team-context.mjs +1 -1
  121. package/dist/components/Foundary/Knowledge/manage-team-context.mjs +1 -1
  122. package/dist/components/Foundary/MainPage.mjs +1 -1
  123. package/dist/components/Foundary/Pages/dashboardpage.mjs +1 -1
  124. package/dist/components/Foundary/RichText/index.mjs +1 -1
  125. package/dist/components/Foundary/RichText/plugins/toolbar-plugin.mjs +1 -1
  126. package/dist/components/Foundary/Views/ColleaguesView.mjs +1 -1
  127. package/dist/components/Foundary/Views/KnowledgeView.mjs +1 -1
  128. package/dist/components/Foundary/Views/index.mjs +1 -1
  129. package/dist/components/Foundary/colleague-form.mjs +1 -1
  130. package/dist/components/Foundary/document-edit.mjs +1 -1
  131. package/dist/components/Foundary/document-preview-examples.mjs +1 -1
  132. package/dist/components/Foundary/document-preview.mjs +1 -1
  133. package/dist/components/Foundary/file-edit.mjs +1 -1
  134. package/dist/components/Foundary/foundary-layout.mjs +1 -1
  135. package/dist/components/Foundary/index.mjs +1 -1
  136. package/dist/components/Foundary/knowledge-browser.mjs +1 -1
  137. package/dist/components/Foundary/knowledge-search.mjs +1 -1
  138. package/dist/components/HeaderFooter/Header.mjs +1 -1
  139. package/dist/components/HeaderFooter/SectionHeading.mjs +1 -1
  140. package/dist/components/HeaderFooter/index.mjs +1 -1
  141. package/dist/components/Heros/HighImpact/index.mjs +1 -1
  142. package/dist/components/Heros/LowImpact/index.mjs +1 -1
  143. package/dist/components/Heros/MediumImpact/index.mjs +1 -1
  144. package/dist/components/Heros/PostHero/index.mjs +1 -1
  145. package/dist/components/Heros/RenderHero.mjs +1 -1
  146. package/dist/components/Heros/index.mjs +1 -1
  147. package/dist/components/Holidays/HolidayTracker.mjs +1 -1
  148. package/dist/components/Holidays/index.mjs +1 -1
  149. package/dist/components/Layouts/OutputHeaderFooter.mjs +1 -1
  150. package/dist/components/Layouts/Print.mjs +1 -1
  151. package/dist/components/Layouts/SlideShow.mjs +1 -1
  152. package/dist/components/Layouts/index.mjs +1 -1
  153. package/dist/components/Menus/SidebarLeft.mjs +1 -1
  154. package/dist/components/Menus/SidebarLeftMulti.mjs +1 -1
  155. package/dist/components/Menus/SidebarRight.mjs +1 -1
  156. package/dist/components/Menus/index.mjs +1 -1
  157. package/dist/components/Payload/CollectionArchive/index.mjs +1 -1
  158. package/dist/components/Payload/Media/index.mjs +1 -1
  159. package/dist/components/Payload/PayloadCard/index.mjs +1 -1
  160. package/dist/components/Payload/RichText/index.mjs +1 -1
  161. package/dist/components/Payload/RichText/serialize.mjs +1 -1
  162. package/dist/components/Payload/index.mjs +1 -1
  163. package/dist/components/Projects/EpicsView.mjs +1 -1
  164. package/dist/components/Projects/FileView.mjs +1 -1
  165. package/dist/components/Projects/KanbanBoardView.mjs +1 -1
  166. package/dist/components/Projects/ProjectPage.mjs +1 -1
  167. package/dist/components/Projects/ProjectView.mjs +1 -1
  168. package/dist/components/Projects/ProjectsIndexView.mjs +1 -1
  169. package/dist/components/Projects/TaskDetailsModal.mjs +1 -1
  170. package/dist/components/Projects/file-list.mjs +1 -1
  171. package/dist/components/Projects/index.mjs +1 -1
  172. package/dist/components/Projects/project-form.mjs +1 -1
  173. package/dist/components/dc-temp/index.mjs +1 -1
  174. package/dist/components/index.js +1 -1
  175. package/dist/components/index.mjs +1 -1
  176. package/dist/components/ui/index.mjs +1 -1
  177. package/dist/components/ui/sidebar.mjs +1 -1
  178. package/dist/decorators/Intranet.mjs +1 -1
  179. package/dist/hooks/index.mjs +1 -1
  180. package/dist/index.js +1 -1
  181. package/dist/index.mjs +1 -1
  182. package/dist/metafile-cjs.json +1 -1
  183. package/dist/metafile-esm.json +1 -1
  184. package/dist/pages/Blog.mjs +1 -1
  185. package/dist/pages/Documentation.mjs +1 -1
  186. package/dist/pages/IndexPage.mjs +1 -1
  187. package/dist/pages/Intranet.js +1 -1
  188. package/dist/pages/Intranet.mjs +1 -1
  189. package/dist/pages/LandingPage.mjs +1 -1
  190. package/dist/pages/Page.mjs +1 -1
  191. package/dist/pages/Publish.mjs +1 -1
  192. package/dist/pages/Website.mjs +1 -1
  193. package/dist/sections/AboutSection.mjs +1 -1
  194. package/dist/sections/BlogDetail.mjs +1 -1
  195. package/dist/sections/BlogList.mjs +1 -1
  196. package/dist/sections/BlogListSection.mjs +1 -1
  197. package/dist/sections/ContactSection.mjs +1 -1
  198. package/dist/sections/PageSections.mjs +1 -1
  199. package/dist/sections/PricingSection.mjs +1 -1
  200. package/dist/sections/ServiceDetail.mjs +1 -1
  201. package/dist/sections/ServiceDetailSection.mjs +1 -1
  202. package/dist/sections/ServiceSection.mjs +1 -1
  203. package/dist/sections/index.mjs +1 -1
  204. package/package.json +1 -1
  205. package/dist/chunk-BVFUCOCP.mjs +0 -3
@@ -1,4 +1,4 @@
1
1
  "use client";
2
2
  "use strict";
3
3
 
4
- import{c as k,h as v,i as R,k as f,l as y,o as x,p as c,q as d,r as h,s as w,v as L,w as P,x as B}from"./chunk-ZFUP5NVF.mjs";import{a as n}from"./chunk-7GSXNSLD.mjs";import{a as S,b as C,c as M}from"./chunk-YNCJATT7.mjs";import{ChevronRight as G}from"lucide-react";import T from"clsx";import{Fragment as H,jsx as e,jsxs as r}from"react/jsx-runtime";function J({mainNav:u,secondaryNav:s,ongoingWork:l,title:t,subTitle:o,pathName:i,menuHeading:O,onNavClick:m,loading:b=!1,LinkComponent:N,...A}){let g=N?a=>e(N,{...a}):m?({href:a,children:p,...I})=>e("button",{onClick:()=>m&&m(a),className:"flex items-center justify-start w-full text-sm text-left px-4 py-2",...I,children:p}):a=>e("a",{...a});return r(k,{...A,variant:"inset",children:[e(v,{children:e(c,{children:e(d,{children:b?r("div",{className:"grid flex-1 p-2 text-left text-m leading-tight",children:[e(n,{className:"bg-gray-200 my-2 w-full h-7"}),e(n,{className:"bg-gray-200 w-3/4 my-2 h-5"})]}):r("div",{className:"grid flex-1 p-2 text-left text-m leading-tight",children:[e("span",{className:"truncate font-semibold",children:t}),o&&e("span",{className:"truncate text-sm",children:o})]})})})}),b&&r(f,{children:[e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"})]}),r(f,{children:[e("div",{className:"px-4 text-sm",children:"Recent Work"}),l&&!b&&l.map((a,p)=>e(F,{subNav:a,pathName:i,Link:g},p)),e("div",{className:"border-t border-gray-200 my-4"}),u&&!b&&u.map((a,p)=>e(F,{subNav:a,pathName:i,Link:g},p)),e(y,{className:"mt-auto",children:e(x,{children:e(c,{children:s&&!b&&s.map(a=>e(d,{children:e(h,{asChild:!0,size:"sm",children:r(g,{href:a.url||"",children:[a.icon&&e(a.icon,{}),e("span",{children:a.label})]})})},a.label))})})})]}),e(R,{})]})}function F({subNav:u,pathName:s,Link:l}){let t=u,o=!1;return t.links&&t.links.map(i=>{i.url===s&&(o=!0)}),e(S,{defaultOpen:!0,className:"group/collapsible",children:e(y,{className:"py-0",children:e(c,{children:e(S,{asChild:!0,defaultOpen:t.isActive,children:r(d,{children:[e(h,{asChild:!0,tooltip:t.label,className:T(o&&"font-bold text-accent"),children:r(l,{href:t.url,children:[t.icon&&e(t.icon,{}),e("span",{children:t.label})]})}),t.links?.length?r(H,{children:[e(C,{asChild:!0,children:r(w,{className:"data-[state=open]:rotate-90",children:[e(G,{}),e("span",{className:"sr-only",children:"Toggle"})]})}),e(M,{children:e(L,{children:t.links?.map(i=>e(P,{children:e(B,{asChild:!0,className:T(i.url===s&&"font-bold text-accent"),children:e(l,{href:i.url,children:e("span",{children:i.label})})})},i.label))})})]}):null]})},t.label)})})})}export{J as a};
4
+ import{c as k,h as v,i as R,k as f,l as y,o as x,p as c,q as d,r as h,s as w,v as L,w as P,x as B}from"./chunk-PXLSH6S2.mjs";import{a as n}from"./chunk-7GSXNSLD.mjs";import{a as S,b as C,c as M}from"./chunk-YNCJATT7.mjs";import{ChevronRight as G}from"lucide-react";import T from"clsx";import{Fragment as H,jsx as e,jsxs as r}from"react/jsx-runtime";function J({mainNav:u,secondaryNav:s,ongoingWork:l,title:t,subTitle:o,pathName:i,menuHeading:O,onNavClick:m,loading:b=!1,LinkComponent:N,...A}){let g=N?a=>e(N,{...a}):m?({href:a,children:p,...I})=>e("button",{onClick:()=>m&&m(a),className:"flex items-center justify-start w-full text-sm text-left px-4 py-2",...I,children:p}):a=>e("a",{...a});return r(k,{...A,variant:"inset",children:[e(v,{children:e(c,{children:e(d,{children:b?r("div",{className:"grid flex-1 p-2 text-left text-m leading-tight",children:[e(n,{className:"bg-gray-200 my-2 w-full h-7"}),e(n,{className:"bg-gray-200 w-3/4 my-2 h-5"})]}):r("div",{className:"grid flex-1 p-2 text-left text-m leading-tight",children:[e("span",{className:"truncate font-semibold",children:t}),o&&e("span",{className:"truncate text-sm",children:o})]})})})}),b&&r(f,{children:[e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"})]}),r(f,{children:[e("div",{className:"px-4 text-sm",children:"Recent Work"}),l&&!b&&l.map((a,p)=>e(F,{subNav:a,pathName:i,Link:g},p)),e("div",{className:"border-t border-gray-200 my-4"}),u&&!b&&u.map((a,p)=>e(F,{subNav:a,pathName:i,Link:g},p)),e(y,{className:"mt-auto",children:e(x,{children:e(c,{children:s&&!b&&s.map(a=>e(d,{children:e(h,{asChild:!0,size:"sm",children:r(g,{href:a.url||"",children:[a.icon&&e(a.icon,{}),e("span",{children:a.label})]})})},a.label))})})})]}),e(R,{})]})}function F({subNav:u,pathName:s,Link:l}){let t=u,o=!1;return t.links&&t.links.map(i=>{i.url===s&&(o=!0)}),e(S,{defaultOpen:!0,className:"group/collapsible",children:e(y,{className:"py-0",children:e(c,{children:e(S,{asChild:!0,defaultOpen:t.isActive,children:r(d,{children:[e(h,{asChild:!0,tooltip:t.label,className:T(o&&"font-bold text-accent"),children:r(l,{href:t.url,children:[t.icon&&e(t.icon,{}),e("span",{children:t.label})]})}),t.links?.length?r(H,{children:[e(C,{asChild:!0,children:r(w,{className:"data-[state=open]:rotate-90",children:[e(G,{}),e("span",{className:"sr-only",children:"Toggle"})]})}),e(M,{children:e(L,{children:t.links?.map(i=>e(P,{children:e(B,{asChild:!0,className:T(i.url===s&&"font-bold text-accent"),children:e(l,{href:i.url,children:e("span",{children:i.label})})})},i.label))})})]}):null]})},t.label)})})})}export{J as a};
@@ -1 +1 @@
1
- import{a as u,c as g,d as p,g as v,i as b}from"./chunk-YFAZQYK4.mjs";import{a as B}from"./chunk-INCYANPB.mjs";import{a as F}from"./chunk-B4H6T2GP.mjs";import{a as l}from"./chunk-TVZOULLL.mjs";import{a as S}from"./chunk-FT3AE7L2.mjs";import{a as w,f as P,g as L,i as A}from"./chunk-3UMMMQEH.mjs";import{b as I}from"./chunk-CSBGSBEU.mjs";import{a as d}from"./chunk-L5JPAKPM.mjs";import{b as m}from"./chunk-ZUA4KNIR.mjs";import{useState as x,useEffect as M}from"react";import{UserIcon as Q,CalendarIcon as $,SaveIcon as j,PlusIcon as q}from"lucide-react";import{jsx as a,jsxs as r}from"react/jsx-runtime";function ie({deal:c,users:f,customer:T,categories:U,onClose:E,onSave:O,onAddComment:V}){let[t,h]=x({...c,value:c.value||0,comments:c.comments||[],customer:c.customer||{}}),[C,D]=x(""),[H,y]=x(!1),[i,s]=x(null);M(()=>{y(JSON.stringify(c)!==JSON.stringify(t))},[c,t]);let R=async()=>{try{let e=await O(t);e.success?(y(!1),s(null)):console.error("Failed to save deal:",e.errors)}catch(e){console.error("Failed to save deal:",e)}},n=(e,o)=>{h(N=>({...N,[e]:o}))},G=e=>{let o=(t.categories||[]).includes(e)?(t.categories||[]).filter(N=>N!==e):[...t.categories||[],e];n("categories",o)},J=async()=>{if(C.trim()){let e={text:C,timestamp:new Date().toISOString()};try{let o=await V(e);if(!o.success){console.error("Failed to add comment:",o.errors);return}}catch(o){console.error("Failed to add comment:",o)}h(o=>({...o,comments:[...o.comments||[],e]})),D("")}},k=e=>{switch(e){case"proposition":return"border-blue-800 text-blue-800";case"source":return"border-green-800 text-green-800";case"sector":return"border-purple-800 text-purple-800";default:return"border-gray-800 text-gray-800"}},W=e=>f?.find(o=>o.id===Number(e));return a(w,{open:!0,children:r(P,{className:"max-w-3xl max-h-[90vh] overflow-hidden flex flex-col [&>button:last-child]:hidden",children:[r(L,{className:"flex flex-row items-center justify-between",children:[a(A,{className:"text-2xl font-bold",children:T?.name||"no customer"}),r("div",{className:"flex space-x-2",children:[a(m,{variant:"outline",onClick:E,children:"Close"}),r(m,{onClick:R,disabled:!H,children:[a(j,{className:"w-4 h-4 mr-2"}),"Save"]})]})]}),r(S,{className:"flex-grow pr-4",children:[r("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-4",children:[a("div",{className:"grid gap-2 m-1",children:i==="value"?a(d,{type:"number",value:t.value,onChange:e=>n("value",Number(e.target.value)),onBlur:()=>s(null),className:"text-3xl font-bold text-green-600",autoFocus:!0}):r("div",{className:"text-3xl font-bold text-green-600 cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>s("value"),children:["\xA3",t.value?.toLocaleString()]})}),r("div",{className:"grid gap-2 m-1",children:[a(l,{className:"text-sm font-medium text-accent",children:"Assignee"}),i==="assignee"?r(u,{value:t?.assignee?.id?.toString()||"",onValueChange:e=>n("assignee",W(e)),children:[a(p,{children:a(g,{placeholder:"Select assignee"})}),a(v,{children:f&&f.map(e=>a(b,{value:e?.id?.toString()||"",children:e.name},e.id))})]}):r("div",{className:"flex items-center space-x-2 cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>s("assignee"),children:[a(Q,{className:"w-4 h-4 text-gray-400"}),a("span",{children:t?.assignee?.name})]})]}),r("div",{className:"grid gap-2 m-1",children:[a(l,{className:"text-sm font-medium text-accent",children:"Closure Date"}),i==="closureDate"?a(d,{type:"date",value:t.closureDate?.split("T")[0]??"",onChange:e=>n("closureDate",e.target.value),onBlur:()=>s(null),className:"mr-2",autoFocus:!0}):r("div",{className:"flex items-center space-x-2 cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>s("closureDate"),children:[a($,{className:"w-4 h-4 text-gray-400"}),a("span",{children:t.closureDate?new Date(t.closureDate).toLocaleDateString("en-GB"):"N/A"})]})]})]}),a("div",{className:"grid grid-cols-1 sm:grid-cols-1 gap-4",children:r("div",{className:"grid gap-2 m-1",children:[a(l,{className:"text-sm font-medium text-accent",children:"Description"}),i==="description"?a(F,{value:t.description||"",onChange:e=>n("description",e.target.value),onBlur:()=>s(null),className:"min-h-[100px]",autoFocus:!0}):a("div",{className:"cursor-pointer p-1 border border-background hover:border-accent pb-5 rounded",onClick:()=>s("description"),children:t.description})]})}),r("div",{className:"grid grid-cols-1 sm:grid-cols-3 pt-2 gap-4",children:[r("div",{className:"grid gap-2 m-1",children:[a(l,{className:"text-sm font-medium text-accent",children:"Status"}),i==="status"?r(u,{value:t.status,onValueChange:e=>{n("status",e),s(null)},children:[a(p,{children:a(g,{placeholder:"Select status"})}),a(v,{children:["Cold","Qualified","Proposal Made","SoW Submitted","Won","Lost"].map(e=>a(b,{value:e,children:e},e))})]}):a("div",{className:"cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>s("status"),children:t.status})]}),r("div",{className:"grid col-span-2 gap-2",children:[a(l,{className:"text-sm font-medium text-accent",children:"Categories"}),i==="categories"?a("div",{className:"grid grid-cols-2 gap-2 m-1",children:U.map(e=>r("div",{className:"flex items-center space-x-2",children:[a(B,{id:e.id?.toString()||"",checked:(t.categories||[]).some(o=>o.id===e.id),onCheckedChange:()=>e.id!==void 0&&G(e)}),a("label",{htmlFor:(e.id??"").toString(),className:`text-sm font-medium ${k(e.type||"sector")} px-2 py-1 rounded`,children:e.name})]},e.id))}):a("div",{className:"flex flex-wrap gap-2 cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>s("categories"),children:t.categories&&t.categories.map(e=>{let o=e;return o?a(I,{variant:"outline",className:k(o.type||"sector"),children:o.name},o.id):null})})]}),r("div",{className:"grid gap-2 m-1",children:[a(l,{className:"text-sm font-medium text-accent",children:"COGE Status"}),i==="gecoStatus"?r(u,{value:t.gecoStatus??void 0,onValueChange:e=>{n("gecoStatus",e),s(null)},children:[a(p,{children:a(g,{placeholder:"Select status"})}),a(v,{children:["firm","forecast","other"].map(e=>a(b,{value:e,children:e.charAt(0).toUpperCase()+e.slice(1)},e))})]}):a("div",{className:"cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>s("gecoStatus"),children:t.gecoStatus?t.gecoStatus.charAt(0).toUpperCase()+t.gecoStatus.slice(1):"N/A"})]})]}),r("div",{className:"grid grid-cols-1 sm:grid-cols-1 pt-4 gap-4",children:[r("div",{className:"grid gap-2",children:[a(l,{className:"text-sm font-medium text-accent",children:"Comments"}),a(S,{className:"h-[200px] overflow-y-auto",children:a("div",{className:"space-y-2",children:t.comments&&t.comments.slice().sort((e,o)=>new Date(o.timestamp||"").getTime()-new Date(e.timestamp||"").getTime()).map(e=>r("div",{className:"p-3 rounded-lg",children:[a("p",{className:"text-sm text-foreground",children:e.text}),r("p",{className:"text-xs text-foreground mt-1",children:[e?.author?.name," - ",new Date(e.timestamp||"").toLocaleString()]})]},e.id))})}),r("div",{className:"flex mt-2",children:[a(d,{value:C,onChange:e=>D(e.target.value),placeholder:"Add a comment...",className:"flex-grow ml-1"}),r(m,{onClick:J,className:"ml-2",children:[a(q,{className:"w-4 h-4 mr-2"}),"Add"]})]})]}),r("div",{className:"text-xs text-gray-500 mt-4",children:["Last modified: ",new Date(t.updatedAt||"").toLocaleString()]})]})]})]})})}export{ie as a};
1
+ import{a as u,c as g,d as p,g as v,i as b}from"./chunk-YFAZQYK4.mjs";import{a as S}from"./chunk-FT3AE7L2.mjs";import{a as F}from"./chunk-B4H6T2GP.mjs";import{a as l}from"./chunk-TVZOULLL.mjs";import{a as B}from"./chunk-INCYANPB.mjs";import{a as w,f as P,g as L,i as A}from"./chunk-3UMMMQEH.mjs";import{b as I}from"./chunk-CSBGSBEU.mjs";import{a as d}from"./chunk-L5JPAKPM.mjs";import{b as m}from"./chunk-ZUA4KNIR.mjs";import{useState as x,useEffect as M}from"react";import{UserIcon as Q,CalendarIcon as $,SaveIcon as j,PlusIcon as q}from"lucide-react";import{jsx as a,jsxs as r}from"react/jsx-runtime";function ie({deal:c,users:f,customer:T,categories:U,onClose:E,onSave:O,onAddComment:V}){let[t,h]=x({...c,value:c.value||0,comments:c.comments||[],customer:c.customer||{}}),[C,D]=x(""),[H,y]=x(!1),[i,s]=x(null);M(()=>{y(JSON.stringify(c)!==JSON.stringify(t))},[c,t]);let R=async()=>{try{let e=await O(t);e.success?(y(!1),s(null)):console.error("Failed to save deal:",e.errors)}catch(e){console.error("Failed to save deal:",e)}},n=(e,o)=>{h(N=>({...N,[e]:o}))},G=e=>{let o=(t.categories||[]).includes(e)?(t.categories||[]).filter(N=>N!==e):[...t.categories||[],e];n("categories",o)},J=async()=>{if(C.trim()){let e={text:C,timestamp:new Date().toISOString()};try{let o=await V(e);if(!o.success){console.error("Failed to add comment:",o.errors);return}}catch(o){console.error("Failed to add comment:",o)}h(o=>({...o,comments:[...o.comments||[],e]})),D("")}},k=e=>{switch(e){case"proposition":return"border-blue-800 text-blue-800";case"source":return"border-green-800 text-green-800";case"sector":return"border-purple-800 text-purple-800";default:return"border-gray-800 text-gray-800"}},W=e=>f?.find(o=>o.id===Number(e));return a(w,{open:!0,children:r(P,{className:"max-w-3xl max-h-[90vh] overflow-hidden flex flex-col [&>button:last-child]:hidden",children:[r(L,{className:"flex flex-row items-center justify-between",children:[a(A,{className:"text-2xl font-bold",children:T?.name||"no customer"}),r("div",{className:"flex space-x-2",children:[a(m,{variant:"outline",onClick:E,children:"Close"}),r(m,{onClick:R,disabled:!H,children:[a(j,{className:"w-4 h-4 mr-2"}),"Save"]})]})]}),r(S,{className:"flex-grow pr-4",children:[r("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-4",children:[a("div",{className:"grid gap-2 m-1",children:i==="value"?a(d,{type:"number",value:t.value,onChange:e=>n("value",Number(e.target.value)),onBlur:()=>s(null),className:"text-3xl font-bold text-green-600",autoFocus:!0}):r("div",{className:"text-3xl font-bold text-green-600 cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>s("value"),children:["\xA3",t.value?.toLocaleString()]})}),r("div",{className:"grid gap-2 m-1",children:[a(l,{className:"text-sm font-medium text-accent",children:"Assignee"}),i==="assignee"?r(u,{value:t?.assignee?.id?.toString()||"",onValueChange:e=>n("assignee",W(e)),children:[a(p,{children:a(g,{placeholder:"Select assignee"})}),a(v,{children:f&&f.map(e=>a(b,{value:e?.id?.toString()||"",children:e.name},e.id))})]}):r("div",{className:"flex items-center space-x-2 cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>s("assignee"),children:[a(Q,{className:"w-4 h-4 text-gray-400"}),a("span",{children:t?.assignee?.name})]})]}),r("div",{className:"grid gap-2 m-1",children:[a(l,{className:"text-sm font-medium text-accent",children:"Closure Date"}),i==="closureDate"?a(d,{type:"date",value:t.closureDate?.split("T")[0]??"",onChange:e=>n("closureDate",e.target.value),onBlur:()=>s(null),className:"mr-2",autoFocus:!0}):r("div",{className:"flex items-center space-x-2 cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>s("closureDate"),children:[a($,{className:"w-4 h-4 text-gray-400"}),a("span",{children:t.closureDate?new Date(t.closureDate).toLocaleDateString("en-GB"):"N/A"})]})]})]}),a("div",{className:"grid grid-cols-1 sm:grid-cols-1 gap-4",children:r("div",{className:"grid gap-2 m-1",children:[a(l,{className:"text-sm font-medium text-accent",children:"Description"}),i==="description"?a(F,{value:t.description||"",onChange:e=>n("description",e.target.value),onBlur:()=>s(null),className:"min-h-[100px]",autoFocus:!0}):a("div",{className:"cursor-pointer p-1 border border-background hover:border-accent pb-5 rounded",onClick:()=>s("description"),children:t.description})]})}),r("div",{className:"grid grid-cols-1 sm:grid-cols-3 pt-2 gap-4",children:[r("div",{className:"grid gap-2 m-1",children:[a(l,{className:"text-sm font-medium text-accent",children:"Status"}),i==="status"?r(u,{value:t.status,onValueChange:e=>{n("status",e),s(null)},children:[a(p,{children:a(g,{placeholder:"Select status"})}),a(v,{children:["Cold","Qualified","Proposal Made","SoW Submitted","Won","Lost"].map(e=>a(b,{value:e,children:e},e))})]}):a("div",{className:"cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>s("status"),children:t.status})]}),r("div",{className:"grid col-span-2 gap-2",children:[a(l,{className:"text-sm font-medium text-accent",children:"Categories"}),i==="categories"?a("div",{className:"grid grid-cols-2 gap-2 m-1",children:U.map(e=>r("div",{className:"flex items-center space-x-2",children:[a(B,{id:e.id?.toString()||"",checked:(t.categories||[]).some(o=>o.id===e.id),onCheckedChange:()=>e.id!==void 0&&G(e)}),a("label",{htmlFor:(e.id??"").toString(),className:`text-sm font-medium ${k(e.type||"sector")} px-2 py-1 rounded`,children:e.name})]},e.id))}):a("div",{className:"flex flex-wrap gap-2 cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>s("categories"),children:t.categories&&t.categories.map(e=>{let o=e;return o?a(I,{variant:"outline",className:k(o.type||"sector"),children:o.name},o.id):null})})]}),r("div",{className:"grid gap-2 m-1",children:[a(l,{className:"text-sm font-medium text-accent",children:"COGE Status"}),i==="gecoStatus"?r(u,{value:t.gecoStatus??void 0,onValueChange:e=>{n("gecoStatus",e),s(null)},children:[a(p,{children:a(g,{placeholder:"Select status"})}),a(v,{children:["firm","forecast","other"].map(e=>a(b,{value:e,children:e.charAt(0).toUpperCase()+e.slice(1)},e))})]}):a("div",{className:"cursor-pointer p-1 border border-background hover:border-accent rounded",onClick:()=>s("gecoStatus"),children:t.gecoStatus?t.gecoStatus.charAt(0).toUpperCase()+t.gecoStatus.slice(1):"N/A"})]})]}),r("div",{className:"grid grid-cols-1 sm:grid-cols-1 pt-4 gap-4",children:[r("div",{className:"grid gap-2",children:[a(l,{className:"text-sm font-medium text-accent",children:"Comments"}),a(S,{className:"h-[200px] overflow-y-auto",children:a("div",{className:"space-y-2",children:t.comments&&t.comments.slice().sort((e,o)=>new Date(o.timestamp||"").getTime()-new Date(e.timestamp||"").getTime()).map(e=>r("div",{className:"p-3 rounded-lg",children:[a("p",{className:"text-sm text-foreground",children:e.text}),r("p",{className:"text-xs text-foreground mt-1",children:[e?.author?.name," - ",new Date(e.timestamp||"").toLocaleString()]})]},e.id))})}),r("div",{className:"flex mt-2",children:[a(d,{value:C,onChange:e=>D(e.target.value),placeholder:"Add a comment...",className:"flex-grow ml-1"}),r(m,{onClick:J,className:"ml-2",children:[a(q,{className:"w-4 h-4 mr-2"}),"Add"]})]})]}),r("div",{className:"text-xs text-gray-500 mt-4",children:["Last modified: ",new Date(t.updatedAt||"").toLocaleString()]})]})]})]})})}export{ie as a};
@@ -1,4 +1,4 @@
1
1
  "use client";
2
2
  "use strict";
3
3
 
4
- import{a as f}from"./chunk-INCYANPB.mjs";import{a as u}from"./chunk-B4H6T2GP.mjs";import{a as n}from"./chunk-TVZOULLL.mjs";import{a as d}from"./chunk-L5JPAKPM.mjs";import{b as p}from"./chunk-ZUA4KNIR.mjs";import{useState as h}from"react";import{Loader2 as y,Plus as j,X as C}from"lucide-react";import{Fragment as x,jsx as t,jsxs as a}from"react/jsx-runtime";var I=({onSubmit:N,onCancel:v,isLoading:o=!1,initialData:i,className:g=""})=>{let[r,w]=h({name:i?.name||"",description:i?.description||"",objectives:i?.objectives||"",workInstructions:i?.workInstructions||"",plan:i?.plan||!1}),[s,b]=h({}),k=()=>{let e={};return r.name.trim()?r.name.trim().length<3&&(e.name="Project name must be at least 3 characters"):e.name="Project name is required",r.objectives.trim()?r.objectives.trim().length<10&&(e.objectives="Please provide more detailed objectives (at least 10 characters)"):e.objectives="Project objectives are required",r.workInstructions.trim()?r.workInstructions.trim().length<20&&(e.workInstructions="Please provide more detailed work instructions (at least 20 characters)"):e.workInstructions="Work instructions are required",b(e),Object.keys(e).length===0},P=async e=>{if(e.preventDefault(),!!k())try{await N(r)}catch(m){console.error("Error submitting project form:",m)}},c=(e,m)=>{w(l=>({...l,[e]:m})),s[e]&&b(l=>({...l,[e]:void 0}))};return a("div",{className:`w-full max-w-2xl ${g}`,children:[a("div",{className:"mb-4",children:[a("div",{className:"flex items-center gap-2",children:[t(j,{className:"h-5 w-5"}),"Create New Project"]}),t("p",{className:"text-sm text-gray-500",children:"Set up a new project with clear objectives and work instructions to help your team collaborate effectively."})]}),a("form",{onSubmit:P,children:[a("div",{className:"space-y-6",children:[a("div",{className:"space-y-2",children:[t(n,{htmlFor:"name",className:"text-sm font-medium",children:"Project Name *"}),t(d,{id:"name",type:"text",placeholder:"Enter project name",value:r.name,onChange:e=>c("name",e.target.value),className:s.name?"border-red-500 focus:border-red-500":"",disabled:o,maxLength:100}),s.name&&t("p",{className:"text-sm text-red-600",children:s.name})]}),a("div",{className:"space-y-2",children:[t(n,{htmlFor:"name",className:"text-sm font-medium",children:"Project Description *"}),t(d,{id:"description",type:"text",placeholder:"Enter project description",value:r.description,onChange:e=>c("description",e.target.value),className:s.description?"border-red-500 focus:border-red-500":"",disabled:o,maxLength:100}),s.description&&t("p",{className:"text-sm text-red-600",children:s.description})]}),a("div",{className:"space-y-2",children:[t(n,{htmlFor:"objectives",className:"text-sm font-medium",children:"Project Objectives *"}),t(u,{id:"objectives",placeholder:"Describe the main goals and objectives of this project...",value:r.objectives,onChange:e=>c("objectives",e.target.value),className:`min-h-[100px] resize-y ${s.objectives?"border-red-500 focus:border-red-500":""}`,disabled:o,maxLength:1e3}),a("div",{className:"flex justify-between text-xs text-gray-500",children:[t("span",{children:s.objectives&&t("span",{className:"text-red-600",children:s.objectives})}),a("span",{children:[r.objectives.length,"/1000"]})]})]}),a("div",{className:"space-y-2",children:[t(n,{htmlFor:"workInstructions",className:"text-sm font-medium",children:"Work Instructions *"}),t(u,{id:"workInstructions",placeholder:"Provide detailed instructions on how the work should be carried out, including processes, standards, and expectations...",value:r.workInstructions,onChange:e=>c("workInstructions",e.target.value),className:`min-h-[120px] resize-y ${s.workInstructions?"border-red-500 focus:border-red-500":""}`,disabled:o,maxLength:2e3}),a("div",{className:"flex justify-between text-xs text-gray-500",children:[t("span",{children:s.workInstructions&&t("span",{className:"text-red-600",children:s.workInstructions})}),a("span",{children:[r.workInstructions.length,"/2000"]})]})]}),a("div",{className:"space-y-3",children:[t(n,{className:"text-sm font-medium",children:"Project Management"}),a("div",{className:"flex items-center space-x-2",children:[t(f,{id:"plan",checked:r.plan,onCheckedChange:e=>c("plan",e===!0),disabled:o}),t(n,{htmlFor:"plan",className:"text-sm text-gray-700 cursor-pointer",children:"Enable project planning and management features"})]}),t("p",{className:"text-xs text-gray-500 ml-6",children:"This will allow project managers to create sprints, assign tasks, and track progress."})]})]}),a("div",{className:"flex justify-end gap-3",children:[v&&a(p,{type:"button",variant:"outline",onClick:v,disabled:o,className:"flex items-center gap-2",children:[t(C,{className:"h-4 w-4"}),"Cancel"]}),t(p,{type:"submit",disabled:o,className:"flex items-center gap-2",children:o?a(x,{children:[t(y,{className:"h-4 w-4 animate-spin"}),"Creating..."]}):a(x,{children:[t(j,{className:"h-4 w-4"}),"Create Project"]})})]})]})]})},$=I;export{I as a,$ as b};
4
+ import{a as u}from"./chunk-B4H6T2GP.mjs";import{a as n}from"./chunk-TVZOULLL.mjs";import{a as f}from"./chunk-INCYANPB.mjs";import{a as d}from"./chunk-L5JPAKPM.mjs";import{b as p}from"./chunk-ZUA4KNIR.mjs";import{useState as h}from"react";import{Loader2 as y,Plus as j,X as C}from"lucide-react";import{Fragment as x,jsx as t,jsxs as a}from"react/jsx-runtime";var I=({onSubmit:N,onCancel:v,isLoading:o=!1,initialData:i,className:g=""})=>{let[r,w]=h({name:i?.name||"",description:i?.description||"",objectives:i?.objectives||"",workInstructions:i?.workInstructions||"",plan:i?.plan||!1}),[s,b]=h({}),k=()=>{let e={};return r.name.trim()?r.name.trim().length<3&&(e.name="Project name must be at least 3 characters"):e.name="Project name is required",r.objectives.trim()?r.objectives.trim().length<10&&(e.objectives="Please provide more detailed objectives (at least 10 characters)"):e.objectives="Project objectives are required",r.workInstructions.trim()?r.workInstructions.trim().length<20&&(e.workInstructions="Please provide more detailed work instructions (at least 20 characters)"):e.workInstructions="Work instructions are required",b(e),Object.keys(e).length===0},P=async e=>{if(e.preventDefault(),!!k())try{await N(r)}catch(m){console.error("Error submitting project form:",m)}},c=(e,m)=>{w(l=>({...l,[e]:m})),s[e]&&b(l=>({...l,[e]:void 0}))};return a("div",{className:`w-full max-w-2xl ${g}`,children:[a("div",{className:"mb-4",children:[a("div",{className:"flex items-center gap-2",children:[t(j,{className:"h-5 w-5"}),"Create New Project"]}),t("p",{className:"text-sm text-gray-500",children:"Set up a new project with clear objectives and work instructions to help your team collaborate effectively."})]}),a("form",{onSubmit:P,children:[a("div",{className:"space-y-6",children:[a("div",{className:"space-y-2",children:[t(n,{htmlFor:"name",className:"text-sm font-medium",children:"Project Name *"}),t(d,{id:"name",type:"text",placeholder:"Enter project name",value:r.name,onChange:e=>c("name",e.target.value),className:s.name?"border-red-500 focus:border-red-500":"",disabled:o,maxLength:100}),s.name&&t("p",{className:"text-sm text-red-600",children:s.name})]}),a("div",{className:"space-y-2",children:[t(n,{htmlFor:"name",className:"text-sm font-medium",children:"Project Description *"}),t(d,{id:"description",type:"text",placeholder:"Enter project description",value:r.description,onChange:e=>c("description",e.target.value),className:s.description?"border-red-500 focus:border-red-500":"",disabled:o,maxLength:100}),s.description&&t("p",{className:"text-sm text-red-600",children:s.description})]}),a("div",{className:"space-y-2",children:[t(n,{htmlFor:"objectives",className:"text-sm font-medium",children:"Project Objectives *"}),t(u,{id:"objectives",placeholder:"Describe the main goals and objectives of this project...",value:r.objectives,onChange:e=>c("objectives",e.target.value),className:`min-h-[100px] resize-y ${s.objectives?"border-red-500 focus:border-red-500":""}`,disabled:o,maxLength:1e3}),a("div",{className:"flex justify-between text-xs text-gray-500",children:[t("span",{children:s.objectives&&t("span",{className:"text-red-600",children:s.objectives})}),a("span",{children:[r.objectives.length,"/1000"]})]})]}),a("div",{className:"space-y-2",children:[t(n,{htmlFor:"workInstructions",className:"text-sm font-medium",children:"Work Instructions *"}),t(u,{id:"workInstructions",placeholder:"Provide detailed instructions on how the work should be carried out, including processes, standards, and expectations...",value:r.workInstructions,onChange:e=>c("workInstructions",e.target.value),className:`min-h-[120px] resize-y ${s.workInstructions?"border-red-500 focus:border-red-500":""}`,disabled:o,maxLength:2e3}),a("div",{className:"flex justify-between text-xs text-gray-500",children:[t("span",{children:s.workInstructions&&t("span",{className:"text-red-600",children:s.workInstructions})}),a("span",{children:[r.workInstructions.length,"/2000"]})]})]}),a("div",{className:"space-y-3",children:[t(n,{className:"text-sm font-medium",children:"Project Management"}),a("div",{className:"flex items-center space-x-2",children:[t(f,{id:"plan",checked:r.plan,onCheckedChange:e=>c("plan",e===!0),disabled:o}),t(n,{htmlFor:"plan",className:"text-sm text-gray-700 cursor-pointer",children:"Enable project planning and management features"})]}),t("p",{className:"text-xs text-gray-500 ml-6",children:"This will allow project managers to create sprints, assign tasks, and track progress."})]})]}),a("div",{className:"flex justify-end gap-3",children:[v&&a(p,{type:"button",variant:"outline",onClick:v,disabled:o,className:"flex items-center gap-2",children:[t(C,{className:"h-4 w-4"}),"Cancel"]}),t(p,{type:"submit",disabled:o,className:"flex items-center gap-2",children:o?a(x,{children:[t(y,{className:"h-4 w-4 animate-spin"}),"Creating..."]}):a(x,{children:[t(j,{className:"h-4 w-4"}),"Create Project"]})})]})]})]})},$=I;export{I as a,$ as b};
@@ -1 +1 @@
1
- import{a as n}from"./chunk-SV7NMNDI.mjs";import{f as s,g as m}from"./chunk-ZGDSCGLC.mjs";import{a as o}from"./chunk-MDJREBVI.mjs";import{jsx as e,jsxs as p}from"react/jsx-runtime";function x({services:t,className:f,title:r,content:i}){let d={settings:{width:"full",card:"light"}};return p("div",{className:"pb-4 md:pb-0",children:[p("div",{className:o("w-full text-left prose"),children:[r&&e("h2",{className:"text-primary",children:r}),e("div",{className:"pb-12 ",children:i&&e(s,{enableGutter:!1,content:i,enableProse:!1,className:o("prose prose-headings:text-foreground prose-p:text-foreground")})})]}),t&&t.length>0&&e("div",{className:"-mx-4 flex flex-wrap justify-between gap-y-8",children:t.map((a,l)=>e("div",{"data-aos":"fade-up","data-aos-delay":n([200,400,600],l),className:"w-full px-4 md:w-1/2 lg:w-1/3 flex",children:e(m,{...d,icon:{type:"none"},title:a.title,image:a.image,content:a.content,link:a.link,className:"w-full"})},l))})]})}export{x as a};
1
+ import{a as n}from"./chunk-SV7NMNDI.mjs";import{f as s,g as m}from"./chunk-VCKKDEC5.mjs";import{a as o}from"./chunk-MDJREBVI.mjs";import{jsx as e,jsxs as p}from"react/jsx-runtime";function x({services:t,className:f,title:r,content:i}){let d={settings:{width:"full",card:"light"}};return p("div",{className:"pb-4 md:pb-0",children:[p("div",{className:o("w-full text-left prose"),children:[r&&e("h2",{className:"text-primary",children:r}),e("div",{className:"pb-12 ",children:i&&e(s,{enableGutter:!1,content:i,enableProse:!1,className:o("prose prose-headings:text-foreground prose-p:text-foreground")})})]}),t&&t.length>0&&e("div",{className:"-mx-4 flex flex-wrap justify-between gap-y-8",children:t.map((a,l)=>e("div",{"data-aos":"fade-up","data-aos-delay":n([200,400,600],l),className:"w-full px-4 md:w-1/2 lg:w-1/3 flex",children:e(m,{...d,icon:{type:"none"},title:a.title,image:a.image,content:a.content,link:a.link,className:"w-full"})},l))})]})}export{x as a};
@@ -1,4 +1,4 @@
1
1
  "use client";
2
2
  "use strict";
3
3
 
4
- import{a as w}from"./chunk-GMLLRSAH.mjs";import{a as g}from"./chunk-B4H6T2GP.mjs";import{a as p}from"./chunk-TVZOULLL.mjs";import{b as x}from"./chunk-CSBGSBEU.mjs";import{a as h,b as k,c as N,e as S}from"./chunk-YO3GQYRJ.mjs";import{a as C}from"./chunk-L5JPAKPM.mjs";import{b as u}from"./chunk-ZUA4KNIR.mjs";import{useState as b,useEffect as J}from"react";import{Bot as O,Plus as W,X,Edit as _}from"lucide-react";import{jsx as a,jsxs as o}from"react/jsx-runtime";function le({colleague:d,onSave:I,onCancel:A,isLoading:i=!1,title:F,submitLabel:K,cancelLabel:B="Cancel",readOnly:E=!1,availableKnowledgeDocuments:D=[]}){let[e,r]=b({type:"digital",name:"",description:"",jobDescription:"",workInstructions:"",capabilities:[],knowledge:[],coreKnowledge:[],version:"1",...d}),[G,Q]=b(""),[j,P]=b(""),[l,T]=b(!E);J(()=>{d&&r(d)},[d]);let R=t=>{t.preventDefault();let s=e.version?parseInt(e.version):0,n=d?(s+1).toString():"1",c={id:e.id||Date.now().toString(),name:e.name,type:"digital",status:"active",joinedDate:e.joinedDate||new Date,lastActive:e.lastActive||new Date,description:e.description,jobDescription:e.jobDescription||"",workInstructions:e.workInstructions||"",capabilities:e.capabilities||[],knowledge:e.knowledge||[],coreKnowledge:e.coreKnowledge||[],version:n,lastUpdated:e.lastUpdated||new Date,isActive:!0};I(c)},f=(t,s,n)=>{if(!s.trim())return;let c=e[t]||[];r({...e,[t]:[...c,s.trim()]}),n("")},U=(t,s)=>{let n=e[t]||[];r({...e,[t]:n.filter((c,v)=>v!==s)})},$=t=>{t.preventDefault(),T(!l)},q=(t,s,n,c,v)=>{let M=e[t]||[];return o("div",{className:"space-y-2",children:[a(p,{children:s}),l&&o("div",{className:"flex gap-2",children:[a(C,{value:n,onChange:m=>c(m.target.value),placeholder:v,onKeyPress:m=>{m.key==="Enter"&&(m.preventDefault(),f(t,n,c))},disabled:i}),a(u,{type:"button",variant:"outline",size:"icon",onClick:()=>f(t,n,c),disabled:i,children:a(W,{className:"h-4 w-4"})})]}),a("div",{className:"flex flex-wrap gap-2",children:M.map((m,y)=>o(x,{className:"gap-1",children:[m,l&&a(u,{type:"button",variant:"ghost",size:"icon",className:"h-4 w-4 p-0 hover:bg-accent hover:text-accent-foreground",onClick:()=>U(t,y),disabled:i,children:a(X,{className:"h-3 w-3"})})]},`${t}-${y}-${m}`))})]})},z=F||(l?d?"Edit Colleague":"Add New Colleague":"View Colleague"),H=K||(d?"Update Colleague":"Add Colleague");return o(h,{className:"m-8 w-full max-w-4xl mx-auto",children:[a(k,{children:o(N,{className:"flex items-center gap-2",children:[a(O,{className:"h-5 w-5"}),z]})}),a(S,{children:o("form",{onSubmit:R,className:"space-y-6",children:[o("div",{className:"space-y-4",children:[o("div",{className:"space-y-2",children:[a(p,{htmlFor:"name",children:"Name *"}),a(C,{id:"name",value:e.name||"",onChange:t=>r({...e,name:t.target.value}),required:!0,disabled:i||!l})]}),o("div",{className:"space-y-2",children:[a(p,{htmlFor:"description",children:"Description"}),a(g,{id:"description",value:e.description||"",onChange:t=>r({...e,description:t.target.value}),rows:3,placeholder:"Brief description of this digital colleague...",disabled:i||!l})]})]}),o("div",{className:"space-y-4",children:[a("h3",{className:"text-lg font-semibold",children:"Digital Colleague Details"}),o("div",{className:"space-y-2",children:[a(p,{htmlFor:"jobDescription",children:"Job Description *"}),a(g,{id:"jobDescription",value:e.jobDescription||"",onChange:t=>r({...e,jobDescription:t.target.value}),rows:4,required:e.type==="digital",disabled:i||!l})]}),o("div",{className:"space-y-2",children:[a(p,{htmlFor:"workInstructions",children:"Work Instructions"}),a(g,{id:"workInstructions",value:e.workInstructions||"",onChange:t=>r({...e,workInstructions:t.target.value}),rows:4,placeholder:"Enter detailed work instructions for this digital colleague...",disabled:i||!l})]}),q("capabilities","Capabilities",j,P,"Add capability"),a(w,{selectedDocuments:e.knowledge||[],onDocumentsChange:t=>r({...e,knowledge:t}),label:"Knowledge",placeholder:"Search for knowledge documents to add...",disabled:i||!l,availableDocuments:D}),a(w,{selectedDocuments:e.coreKnowledge||[],onDocumentsChange:t=>r({...e,coreKnowledge:t}),label:"Core Knowledge",placeholder:"Search for core knowledge documents...",maxSelections:5,disabled:i||!l,availableDocuments:D})]}),o("div",{className:"flex justify-end gap-2 pt-4 border-t",children:[a(u,{type:"button",variant:"outline",onClick:A,disabled:i,children:l?B:"Close"}),l?a(u,{type:"submit",disabled:i,children:i?"Saving...":H}):o(u,{type:"button",onClick:$,disabled:i,className:"gap-2",children:[a(_,{className:"h-4 w-4"}),"Edit"]})]})]})})]})}export{le as a};
4
+ import{a as w}from"./chunk-5GHKXLL2.mjs";import{a as g}from"./chunk-B4H6T2GP.mjs";import{a as p}from"./chunk-TVZOULLL.mjs";import{b as x}from"./chunk-CSBGSBEU.mjs";import{a as h,b as k,c as N,e as S}from"./chunk-YO3GQYRJ.mjs";import{a as C}from"./chunk-L5JPAKPM.mjs";import{b as u}from"./chunk-ZUA4KNIR.mjs";import{useState as b,useEffect as J}from"react";import{Bot as O,Plus as W,X,Edit as _}from"lucide-react";import{jsx as a,jsxs as o}from"react/jsx-runtime";function le({colleague:d,onSave:I,onCancel:A,isLoading:i=!1,title:F,submitLabel:K,cancelLabel:B="Cancel",readOnly:E=!1,availableKnowledgeDocuments:D=[]}){let[e,r]=b({type:"digital",name:"",description:"",jobDescription:"",workInstructions:"",capabilities:[],knowledge:[],coreKnowledge:[],version:"1",...d}),[G,Q]=b(""),[j,P]=b(""),[l,T]=b(!E);J(()=>{d&&r(d)},[d]);let R=t=>{t.preventDefault();let s=e.version?parseInt(e.version):0,n=d?(s+1).toString():"1",c={id:e.id||Date.now().toString(),name:e.name,type:"digital",status:"active",joinedDate:e.joinedDate||new Date,lastActive:e.lastActive||new Date,description:e.description,jobDescription:e.jobDescription||"",workInstructions:e.workInstructions||"",capabilities:e.capabilities||[],knowledge:e.knowledge||[],coreKnowledge:e.coreKnowledge||[],version:n,lastUpdated:e.lastUpdated||new Date,isActive:!0};I(c)},f=(t,s,n)=>{if(!s.trim())return;let c=e[t]||[];r({...e,[t]:[...c,s.trim()]}),n("")},U=(t,s)=>{let n=e[t]||[];r({...e,[t]:n.filter((c,v)=>v!==s)})},$=t=>{t.preventDefault(),T(!l)},q=(t,s,n,c,v)=>{let M=e[t]||[];return o("div",{className:"space-y-2",children:[a(p,{children:s}),l&&o("div",{className:"flex gap-2",children:[a(C,{value:n,onChange:m=>c(m.target.value),placeholder:v,onKeyPress:m=>{m.key==="Enter"&&(m.preventDefault(),f(t,n,c))},disabled:i}),a(u,{type:"button",variant:"outline",size:"icon",onClick:()=>f(t,n,c),disabled:i,children:a(W,{className:"h-4 w-4"})})]}),a("div",{className:"flex flex-wrap gap-2",children:M.map((m,y)=>o(x,{className:"gap-1",children:[m,l&&a(u,{type:"button",variant:"ghost",size:"icon",className:"h-4 w-4 p-0 hover:bg-accent hover:text-accent-foreground",onClick:()=>U(t,y),disabled:i,children:a(X,{className:"h-3 w-3"})})]},`${t}-${y}-${m}`))})]})},z=F||(l?d?"Edit Colleague":"Add New Colleague":"View Colleague"),H=K||(d?"Update Colleague":"Add Colleague");return o(h,{className:"m-8 w-full max-w-4xl mx-auto",children:[a(k,{children:o(N,{className:"flex items-center gap-2",children:[a(O,{className:"h-5 w-5"}),z]})}),a(S,{children:o("form",{onSubmit:R,className:"space-y-6",children:[o("div",{className:"space-y-4",children:[o("div",{className:"space-y-2",children:[a(p,{htmlFor:"name",children:"Name *"}),a(C,{id:"name",value:e.name||"",onChange:t=>r({...e,name:t.target.value}),required:!0,disabled:i||!l})]}),o("div",{className:"space-y-2",children:[a(p,{htmlFor:"description",children:"Description"}),a(g,{id:"description",value:e.description||"",onChange:t=>r({...e,description:t.target.value}),rows:3,placeholder:"Brief description of this digital colleague...",disabled:i||!l})]})]}),o("div",{className:"space-y-4",children:[a("h3",{className:"text-lg font-semibold",children:"Digital Colleague Details"}),o("div",{className:"space-y-2",children:[a(p,{htmlFor:"jobDescription",children:"Job Description *"}),a(g,{id:"jobDescription",value:e.jobDescription||"",onChange:t=>r({...e,jobDescription:t.target.value}),rows:4,required:e.type==="digital",disabled:i||!l})]}),o("div",{className:"space-y-2",children:[a(p,{htmlFor:"workInstructions",children:"Work Instructions"}),a(g,{id:"workInstructions",value:e.workInstructions||"",onChange:t=>r({...e,workInstructions:t.target.value}),rows:4,placeholder:"Enter detailed work instructions for this digital colleague...",disabled:i||!l})]}),q("capabilities","Capabilities",j,P,"Add capability"),a(w,{selectedDocuments:e.knowledge||[],onDocumentsChange:t=>r({...e,knowledge:t}),label:"Knowledge",placeholder:"Search for knowledge documents to add...",disabled:i||!l,availableDocuments:D}),a(w,{selectedDocuments:e.coreKnowledge||[],onDocumentsChange:t=>r({...e,coreKnowledge:t}),label:"Core Knowledge",placeholder:"Search for core knowledge documents...",maxSelections:5,disabled:i||!l,availableDocuments:D})]}),o("div",{className:"flex justify-end gap-2 pt-4 border-t",children:[a(u,{type:"button",variant:"outline",onClick:A,disabled:i,children:l?B:"Close"}),l?a(u,{type:"submit",disabled:i,children:i?"Saving...":H}):o(u,{type:"button",onClick:$,disabled:i,className:"gap-2",children:[a(_,{className:"h-4 w-4"}),"Edit"]})]})]})})]})}export{le as a};
@@ -1 +1 @@
1
- import{a as n}from"./chunk-SV7NMNDI.mjs";import{a as r}from"./chunk-LFXMB6YE.mjs";import{a as o}from"./chunk-LF55USCD.mjs";import{a as e}from"./chunk-FMJBJ3HN.mjs";import{jsx as i,jsxs as c}from"react/jsx-runtime";function S({sectionHeading:p,cards:a}){return i("section",{className:"section-padding-primary !pt-0",children:c(e,{children:[i("div",{className:"mx-auto max-w-[630px]","data-aos":"fade-up","data-aos-delay":"100",children:i(r,{...p,alignment:"center",hasBottomSpacing:!0})}),a&&a.length>0&&i("div",{className:"grid gap-30px",children:a.map((d,t)=>i("div",{"data-aos":"fade-up","data-aos-delay":n([200,400,600],t),className:"py-2",children:i(o,{...d})},t))})]})})}export{S as a};
1
+ import{a as n}from"./chunk-SV7NMNDI.mjs";import{a as r}from"./chunk-GEPYRPWO.mjs";import{a as o}from"./chunk-LF55USCD.mjs";import{a as e}from"./chunk-FMJBJ3HN.mjs";import{jsx as i,jsxs as c}from"react/jsx-runtime";function S({sectionHeading:p,cards:a}){return i("section",{className:"section-padding-primary !pt-0",children:c(e,{children:[i("div",{className:"mx-auto max-w-[630px]","data-aos":"fade-up","data-aos-delay":"100",children:i(r,{...p,alignment:"center",hasBottomSpacing:!0})}),a&&a.length>0&&i("div",{className:"grid gap-30px",children:a.map((d,t)=>i("div",{"data-aos":"fade-up","data-aos-delay":n([200,400,600],t),className:"py-2",children:i(o,{...d})},t))})]})})}export{S as a};
@@ -1,4 +1,4 @@
1
1
  "use client";
2
2
  "use strict";
3
3
 
4
- import{c as v,h as R,i as x,k as f,l as p,m as w,o as L,p as c,q as d,r as y,s as P,v as B,w as T,x as F}from"./chunk-ZFUP5NVF.mjs";import{a as n}from"./chunk-7GSXNSLD.mjs";import{a as S,b as N,c as k}from"./chunk-YNCJATT7.mjs";import{ChevronRight as H}from"lucide-react";import G from"clsx";import{Fragment as z,jsx as e,jsxs as r}from"react/jsx-runtime";function Q({mainNav:o,secondaryNav:s,title:u,subTitle:t,pathName:b,menuHeading:i,onNavClick:m,loading:l=!1,LinkComponent:h,...I}){let M=h?a=>e(h,{...a}):m?({href:a,children:C,...g})=>e("button",{onClick:()=>m&&m(a),className:"flex items-center justify-start w-full text-sm text-left px-4 py-2",...g,children:C}):a=>e("a",{...a});return r(v,{...I,variant:"inset",children:[e(R,{children:e(c,{children:e(d,{children:l?r("div",{className:"grid flex-1 p-2 text-left text-m leading-tight",children:[e(n,{className:"bg-gray-200 my-2 w-full h-7"}),e(n,{className:"bg-gray-200 w-3/4 my-2 h-5"})]}):r("div",{className:"grid flex-1 p-2 text-left text-m leading-tight",children:[e("span",{className:"truncate font-semibold",children:u}),t&&e("span",{className:"truncate text-sm",children:t})]})})})}),l&&r(f,{children:[e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"})]}),r(f,{children:[o&&!l&&o.map((a,C)=>r(p,{children:[e(w,{children:a.name}),a&&!l&&a.nav.map((g,A)=>e(O,{subNav:g,pathName:b,Link:M},A))]})),e(p,{className:"mt-auto",children:e(L,{children:e(c,{children:s&&!l&&s.map(a=>e(d,{children:e(y,{asChild:!0,size:"sm",children:r(M,{href:a.url||"",children:[a.icon&&e(a.icon,{}),e("span",{children:a.label})]})})},a.label))})})})]}),e(x,{})]})}function O({subNav:o,pathName:s,Link:u}){let t=o,b=!1;return t.links&&t.links.map(i=>{i.url===s&&(b=!0)}),e(S,{defaultOpen:!0,className:"group/collapsible",children:e(p,{className:"py-0",children:e(c,{children:e(S,{asChild:!0,defaultOpen:t.isActive,children:r(d,{children:[e(y,{asChild:!0,tooltip:t.label,className:G(b&&"font-bold text-accent"),children:r(u,{href:t.url,children:[t.icon&&e(t.icon,{}),e("span",{children:t.label})]})}),t.links?.length?r(z,{children:[e(N,{asChild:!0,children:r(P,{className:"data-[state=open]:rotate-90",children:[e(H,{}),e("span",{className:"sr-only",children:"Toggle"})]})}),e(k,{children:e(B,{children:t.links?.map(i=>e(T,{children:e(F,{asChild:!0,className:G(i.url===s&&"font-bold text-accent"),children:e(u,{href:i.url,children:e("span",{children:i.label})})})},i.label))})})]}):null]})},t.label)})})})}export{Q as a};
4
+ import{c as v,h as R,i as x,k as f,l as p,m as w,o as L,p as c,q as d,r as y,s as P,v as B,w as T,x as F}from"./chunk-PXLSH6S2.mjs";import{a as n}from"./chunk-7GSXNSLD.mjs";import{a as S,b as N,c as k}from"./chunk-YNCJATT7.mjs";import{ChevronRight as H}from"lucide-react";import G from"clsx";import{Fragment as z,jsx as e,jsxs as r}from"react/jsx-runtime";function Q({mainNav:o,secondaryNav:s,title:u,subTitle:t,pathName:b,menuHeading:i,onNavClick:m,loading:l=!1,LinkComponent:h,...I}){let M=h?a=>e(h,{...a}):m?({href:a,children:C,...g})=>e("button",{onClick:()=>m&&m(a),className:"flex items-center justify-start w-full text-sm text-left px-4 py-2",...g,children:C}):a=>e("a",{...a});return r(v,{...I,variant:"inset",children:[e(R,{children:e(c,{children:e(d,{children:l?r("div",{className:"grid flex-1 p-2 text-left text-m leading-tight",children:[e(n,{className:"bg-gray-200 my-2 w-full h-7"}),e(n,{className:"bg-gray-200 w-3/4 my-2 h-5"})]}):r("div",{className:"grid flex-1 p-2 text-left text-m leading-tight",children:[e("span",{className:"truncate font-semibold",children:u}),t&&e("span",{className:"truncate text-sm",children:t})]})})})}),l&&r(f,{children:[e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"})]}),r(f,{children:[o&&!l&&o.map((a,C)=>r(p,{children:[e(w,{children:a.name}),a&&!l&&a.nav.map((g,A)=>e(O,{subNav:g,pathName:b,Link:M},A))]})),e(p,{className:"mt-auto",children:e(L,{children:e(c,{children:s&&!l&&s.map(a=>e(d,{children:e(y,{asChild:!0,size:"sm",children:r(M,{href:a.url||"",children:[a.icon&&e(a.icon,{}),e("span",{children:a.label})]})})},a.label))})})})]}),e(x,{})]})}function O({subNav:o,pathName:s,Link:u}){let t=o,b=!1;return t.links&&t.links.map(i=>{i.url===s&&(b=!0)}),e(S,{defaultOpen:!0,className:"group/collapsible",children:e(p,{className:"py-0",children:e(c,{children:e(S,{asChild:!0,defaultOpen:t.isActive,children:r(d,{children:[e(y,{asChild:!0,tooltip:t.label,className:G(b&&"font-bold text-accent"),children:r(u,{href:t.url,children:[t.icon&&e(t.icon,{}),e("span",{children:t.label})]})}),t.links?.length?r(z,{children:[e(N,{asChild:!0,children:r(P,{className:"data-[state=open]:rotate-90",children:[e(H,{}),e("span",{className:"sr-only",children:"Toggle"})]})}),e(k,{children:e(B,{children:t.links?.map(i=>e(T,{children:e(F,{asChild:!0,className:G(i.url===s&&"font-bold text-accent"),children:e(u,{href:i.url,children:e("span",{children:i.label})})})},i.label))})})]}):null]})},t.label)})})})}export{Q as a};
@@ -1 +1 @@
1
- import{a as n}from"./chunk-MZP7RIQZ.mjs";import{a as l}from"./chunk-AJ7A2ZQ3.mjs";import{a as i}from"./chunk-JJSIBEFX.mjs";import{a as m}from"./chunk-Z5W2WY26.mjs";import{ChevronRightIcon as c,HomeIcon as f}from"@heroicons/react/20/solid";import{Fragment as h,jsx as e,jsxs as a}from"react/jsx-runtime";var d={highImpact:i,lowImpact:l,mediumImpact:m,sectionHero:n},H=t=>{let{type:o}=t||{};if(!o||o==="none")return null;let r=d[o];return r?e(r,{...t}):null};function N({breadcrumbItems:t}){if(t&&t.length>0){let o=t.filter(r=>r.label.toLowerCase()!=="home");return e("nav",{"aria-label":"Breadcrumb",className:"flex",children:a("ol",{role:"list",className:"flex items-center space-x-4",children:[e("li",{children:e("div",{children:a("a",{href:"/",className:"text-foreground hover:text-accent",children:[e(f,{"aria-hidden":"true",className:"size-5 shrink-0"}),e("span",{className:"sr-only",children:"Home"})]})})}),o.map((r,s)=>e("li",{children:a("div",{className:"flex items-center",children:[e(c,{"aria-hidden":"true",className:"size-5 shrink-0 text-gray-400"}),r.href?e("a",{href:r.href,className:"ml-4 text-sm font-medium text-foreground hover:text-accent",children:r.label}):e("div",{className:"ml-4 text-sm font-medium text-foreground hover:text-accent",children:r.label})]})},s))]})})}return e(h,{})}export{H as a,N as b};
1
+ import{a as n}from"./chunk-MZP7RIQZ.mjs";import{a as i}from"./chunk-AFWCGPWL.mjs";import{a as l}from"./chunk-BJ4PT44N.mjs";import{a as m}from"./chunk-KBFRFIHJ.mjs";import{ChevronRightIcon as c,HomeIcon as f}from"@heroicons/react/20/solid";import{Fragment as h,jsx as e,jsxs as a}from"react/jsx-runtime";var d={highImpact:i,lowImpact:l,mediumImpact:m,sectionHero:n},H=t=>{let{type:o}=t||{};if(!o||o==="none")return null;let r=d[o];return r?e(r,{...t}):null};function N({breadcrumbItems:t}){if(t&&t.length>0){let o=t.filter(r=>r.label.toLowerCase()!=="home");return e("nav",{"aria-label":"Breadcrumb",className:"flex",children:a("ol",{role:"list",className:"flex items-center space-x-4",children:[e("li",{children:e("div",{children:a("a",{href:"/",className:"text-foreground hover:text-accent",children:[e(f,{"aria-hidden":"true",className:"size-5 shrink-0"}),e("span",{className:"sr-only",children:"Home"})]})})}),o.map((r,s)=>e("li",{children:a("div",{className:"flex items-center",children:[e(c,{"aria-hidden":"true",className:"size-5 shrink-0 text-gray-400"}),r.href?e("a",{href:r.href,className:"ml-4 text-sm font-medium text-foreground hover:text-accent",children:r.label}):e("div",{className:"ml-4 text-sm font-medium text-foreground hover:text-accent",children:r.label})]})},s))]})})}return e(h,{})}export{H as a,N as b};
@@ -1,2 +1,2 @@
1
- import{f as o}from"./chunk-ZGDSCGLC.mjs";import l from"next/image";import{jsx as e,jsxs as i}from"react/jsx-runtime";var n=({logoImage:a})=>i("footer",{className:`absolute bottom-0 left-0 w-full py-2 px-8 flex justify-between items-center transition-colors duration-300
1
+ import{f as o}from"./chunk-VCKKDEC5.mjs";import l from"next/image";import{jsx as e,jsxs as i}from"react/jsx-runtime";var n=({logoImage:a})=>i("footer",{className:`absolute bottom-0 left-0 w-full py-2 px-8 flex justify-between items-center transition-colors duration-300
2
2
  dark bg-background text-primary`,children:[i("div",{className:"flex px-6 items-center space-x-2",children:[a&&e("img",{src:a.src,alt:"Cortex Reply Logo",className:"h-8"}),e("span",{className:"pl-12 text-sm",children:"Power up your people"})]}),e("a",{href:"https://cortexreply.com",className:"text-sm hover:underline",children:"cortexreply.com"})]}),p=({title:a})=>e("header",{className:"absolute top-0 left-0 w-full py-4 px-8 flex justify-between items-center transition-colors duration-300 dark bg-background text-foreground",children:e("div",{className:"container",children:e("span",{className:"container text-4xl px-6",children:a})})}),h=a=>{let{title:r,hero:t,logoImage:s}=a;return i("div",{className:"relative w-full h-full flex flex-col justify-center min-h-[500px] p-10",children:[e("div",{className:"absolute inset-0",children:e(l,{src:t.media&&t.media.url?t.media.url:"/hero.png",alt:"Background",width:t.media&&t.media.width?t.media.width??1920:1920,height:t.media&&t.media.height?t.media.height??1080:1080,style:{objectFit:"cover"},className:"opacity-80 h-full dark:opacity-60"})}),e("div",{className:"absolute left-16 z-50 top-4 flex flex-col items-start gap-4",children:s&&e("div",{className:"h-24",children:e(l,{src:s.src,alt:"Company logo",className:"h-full w-full object-contain",width:192,height:96})})}),e("div",{className:"absolute inset-0 bg-black/30 dark:bg-black/50"}),i("div",{className:"relative pl-24 z-10 max-w-3xl",children:[e("p",{className:"text-lg font-medium pt-48 text-accent mb-2",children:r}),t.richText&&e(o,{content:t.richText,enableGutter:!1,className:"prose-headings:text-white prose-p:text-white"})]})]})};export{n as a,p as b,h as c};
@@ -1 +1 @@
1
- import{f as r}from"./chunk-ZGDSCGLC.mjs";import{a as n}from"./chunk-MDJREBVI.mjs";import{jsx as t,jsxs as c}from"react/jsx-runtime";function f({subtitle:s,title:o,description:e,alignment:a="start",hasBottomSpacing:i=!1,className:m,invert:l=!1}){let p=n(a==="start"&&"text-left",a==="center"&&"text-center",a==="end"&&"text-right",{"mb-10 md:mb-[3.75rem]":i},"prose",m);return c("div",{className:p,children:[s&&t("span",{className:"mb-[.625rem] block font-semibold uppercase text-accent md:text-md",children:s}),t("h2",{className:n("text-primary mt-0"),children:o}),typeof e=="string"?e&&t("p",{className:"mt-5 whitespace-pre-line text-foreground",children:e}):e&&t(r,{content:e,enableGutter:!1,className:"prose-headings:text-accent prose-p:text-primary"})]})}export{f as a};
1
+ import{f as r}from"./chunk-VCKKDEC5.mjs";import{a as n}from"./chunk-MDJREBVI.mjs";import{jsx as t,jsxs as c}from"react/jsx-runtime";function f({subtitle:s,title:o,description:e,alignment:a="start",hasBottomSpacing:i=!1,className:m,invert:l=!1}){let p=n(a==="start"&&"text-left",a==="center"&&"text-center",a==="end"&&"text-right",{"mb-10 md:mb-[3.75rem]":i},"prose",m);return c("div",{className:p,children:[s&&t("span",{className:"mb-[.625rem] block font-semibold uppercase text-accent md:text-md",children:s}),t("h2",{className:n("text-primary mt-0"),children:o}),typeof e=="string"?e&&t("p",{className:"mt-5 whitespace-pre-line text-foreground",children:e}):e&&t(r,{content:e,enableGutter:!1,className:"prose-headings:text-accent prose-p:text-primary"})]})}export{f as a};
@@ -1,4 +1,4 @@
1
1
  "use client";
2
2
  "use strict";
3
3
 
4
- import{a as N}from"./chunk-DZDMH6IZ.mjs";import{a as x}from"./chunk-CTDGP5H4.mjs";import{a as g}from"./chunk-4KVVVRGU.mjs";import{a as f,b as y}from"./chunk-QY3UXH77.mjs";import{a as n}from"./chunk-3W5SE2HO.mjs";import{a as b}from"./chunk-MQG7MKTK.mjs";import{a as r,b as h,d as v}from"./chunk-DXRAJQMA.mjs";import{a as u}from"./chunk-JMJUFHDA.mjs";import{a}from"./chunk-HF33ZXKX.mjs";import{useState as C}from"react";import{motion as G,AnimatePresence as Y}from"motion/react";import{Bot as z}from"lucide-react";import{jsx as e,jsxs as o}from"react/jsx-runtime";function K({title:k="Digital Colleagues",businessUnits:c,projects:m,fileCount:A,teamMemberCount:w,onCreateProject:P,onOpenProject:j,sidebarItems:W,initialColleagues:F,users:T,onColleagueAdd:S,onColleagueEdit:U,onColleagueDelete:I}){let[i,s]=C("home"),[l,O]=C(c[0]),d=t=>{console.log("Opening app:",t.name)},p=t=>{console.log("Favoriting app:",t.name)},B=t=>{console.log("Opening file:",t.name)},_=t=>{console.log("Sharing file:",t.name)},D=t=>{console.log("Opening project:",t.name),j(t)},R=t=>{console.log("Sharing project:",t.name)},L=t=>{O(t),console.log("Business unit changed to:",t.name)},E=()=>{console.log("Copilot clicked - navigating to chat"),s("chat")},H=t=>{console.log("Notification removed:",t)},M=()=>{console.log("All notifications removed")},V=()=>{switch(i){case"home":return o("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[o("section",{className:"text-center py-12",children:[o("h1",{className:"text-4xl font-bold mb-4",children:["Welcome to the ",l.name," team"]}),e("p",{className:"text-xl text-muted-foreground mb-8",children:"This is your collaborative workspace for productivity and knowledge sharing."})]}),o("section",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:[o("div",{className:"bg-card p-6 rounded-lg border",children:[e("h3",{className:"text-lg font-semibold mb-2",children:"Projects"}),e("p",{className:"text-3xl font-bold text-primary",children:m.length}),e("p",{className:"text-sm text-muted-foreground",children:"Active projects"})]}),o("div",{className:"bg-card p-6 rounded-lg border",children:[e("h3",{className:"text-lg font-semibold mb-2",children:"Team Members"}),e("p",{className:"text-3xl font-bold text-primary",children:w}),e("p",{className:"text-sm text-muted-foreground",children:"Collaborators"})]}),o("div",{className:"bg-card p-6 rounded-lg border",children:[e("h3",{className:"text-lg font-semibold mb-2",children:"Files"}),e("p",{className:"text-3xl font-bold text-primary",children:A}),e("p",{className:"text-sm text-muted-foreground",children:"Project files"})]})]}),e(a,{title:"Chat with your team",gradient:"bg-gradient-to-r from-pink-600 via-red-600 to-orange-600",primaryAction:{label:"Go",onClick:()=>s("chat")}})]});case"colleagues":return e(N,{initialColleagues:F,availableUsers:T,onColleagueAdd:S,onColleagueEdit:U,onColleagueDelete:I});case"chat":return o("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[o("section",{className:"text-center py-12",children:[e("h1",{className:"text-4xl font-bold mb-4",children:"Team Chat"}),o("p",{className:"text-xl text-muted-foreground mb-8",children:["Connect with your ",l.name," team members and collaborate in real-time."]})]}),e(a,{title:"Launch Full Chat Interface",description:"Access the complete chat experience with AI assistance.",gradient:"bg-gradient-to-r from-blue-600 via-purple-600 to-pink-600",primaryAction:{label:"Open Chat",onClick:()=>console.log("Open full chat interface")}})]});case"apps":return o("div",{className:"space-y-8",children:[e(a,{title:"Creative Apps Collection",description:"Discover our full suite of professional design and creative applications.",gradient:"bg-gradient-to-r from-pink-600 via-red-600 to-orange-600",primaryAction:{label:"Install Desktop App",onClick:()=>console.log("Install desktop app clicked")}}),o("section",{className:"space-y-4",children:[e("h2",{className:"text-2xl font-semibold",children:"New Releases"}),e("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4",children:r.filter(t=>t.new).map(t=>e(n,{app:t,showProgress:!0,onOpen:d,onFavorite:p},t.name))})]}),o("section",{className:"space-y-4",children:[e("h2",{className:"text-2xl font-semibold",children:"All Apps"}),e("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4",children:r.map(t=>e(n,{app:t,onOpen:d,onFavorite:p},t.name))})]})]});case"knowledge":return e(x,{});case"files":return o("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[e(a,{title:"Your Creative Files",description:"Access, manage, and share all your design files in one place.",gradient:"bg-gradient-to-r from-teal-600 via-cyan-600 to-blue-600",primaryAction:{label:"Upload Files",onClick:()=>console.log("Upload files clicked")}}),o("section",{className:"space-y-4",children:[e("div",{className:"flex items-center justify-between",children:e("h2",{className:"text-2xl font-semibold",children:"All Files"})}),e(u,{files:h,onFileClick:B})]})]});case"projects":return o("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[e(a,{title:"Project Management",description:"Organize your creative work into projects and collaborate with your team.",gradient:"bg-gradient-to-r from-purple-600 via-violet-600 to-indigo-600",primaryAction:{label:"New Project",onClick:P}}),o("section",{className:"space-y-4",children:[e("h2",{className:"text-2xl font-semibold",children:"Active Projects"}),e("div",{className:"grid grid-cols-1 gap-3 md:grid-cols-2 lg:grid-cols-3",children:m.map(t=>e(b,{project:t,onOpen:D,onShare:R},t.name))})]})]});case"learn":return o("div",{className:"space-y-8",children:[e(a,{title:"Learn & Grow",description:"Expand your creative skills with tutorials, courses, and resources.",gradient:"bg-gradient-to-r from-green-600 via-emerald-600 to-teal-600",primaryAction:{label:"Upgrade to Pro",onClick:()=>console.log("Upgrade to pro clicked")}}),o("section",{className:"space-y-4",children:[e("h2",{className:"text-2xl font-semibold",children:"Featured Tutorials"}),e("div",{className:"grid grid-cols-1 gap-6 md:grid-cols-2 lg:grid-cols-3",children:v.slice(0,3).map(t=>o("div",{className:"rounded-3xl border p-6",children:[e("h3",{className:"font-semibold mb-2",children:t.title}),e("p",{className:"text-sm text-muted-foreground mb-4",children:t.description}),o("div",{className:"flex items-center justify-between text-sm",children:[e("span",{children:t.duration}),e("span",{children:t.level})]})]},t.title))})]})]});default:return null}};return e(g,{sidebarItems:f,title:k,notifications:y,businessUnits:c,currentBusinessUnit:l,onBusinessUnitChange:L,activeTab:i,onTabChange:s,showTabs:!0,onActionClick:E,actionIcon:e(z,{className:"mr-2 h-4 w-4"}),actionText:"Start Chat",onNotificationRemove:H,onRemoveAll:M,children:e(Y,{mode:"wait",children:e(G.div,{className:"flex-1 h-full",initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:V()},i)})})}export{K as a};
4
+ import{a as N}from"./chunk-N4GZJH6H.mjs";import{a as x}from"./chunk-OM3GMTI3.mjs";import{a as f,b as y}from"./chunk-QY3UXH77.mjs";import{a as g}from"./chunk-NMHAXHKJ.mjs";import{a as n}from"./chunk-3W5SE2HO.mjs";import{a as r,b as h,d as v}from"./chunk-DXRAJQMA.mjs";import{a as b}from"./chunk-MQG7MKTK.mjs";import{a as u}from"./chunk-PTRLJGWG.mjs";import{a}from"./chunk-HF33ZXKX.mjs";import{useState as C}from"react";import{motion as G,AnimatePresence as Y}from"motion/react";import{Bot as z}from"lucide-react";import{jsx as e,jsxs as o}from"react/jsx-runtime";function K({title:k="Digital Colleagues",businessUnits:c,projects:m,fileCount:A,teamMemberCount:w,onCreateProject:P,onOpenProject:j,sidebarItems:W,initialColleagues:F,users:T,onColleagueAdd:S,onColleagueEdit:U,onColleagueDelete:I}){let[i,s]=C("home"),[l,O]=C(c[0]),d=t=>{console.log("Opening app:",t.name)},p=t=>{console.log("Favoriting app:",t.name)},B=t=>{console.log("Opening file:",t.name)},_=t=>{console.log("Sharing file:",t.name)},D=t=>{console.log("Opening project:",t.name),j(t)},R=t=>{console.log("Sharing project:",t.name)},L=t=>{O(t),console.log("Business unit changed to:",t.name)},E=()=>{console.log("Copilot clicked - navigating to chat"),s("chat")},H=t=>{console.log("Notification removed:",t)},M=()=>{console.log("All notifications removed")},V=()=>{switch(i){case"home":return o("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[o("section",{className:"text-center py-12",children:[o("h1",{className:"text-4xl font-bold mb-4",children:["Welcome to the ",l.name," team"]}),e("p",{className:"text-xl text-muted-foreground mb-8",children:"This is your collaborative workspace for productivity and knowledge sharing."})]}),o("section",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:[o("div",{className:"bg-card p-6 rounded-lg border",children:[e("h3",{className:"text-lg font-semibold mb-2",children:"Projects"}),e("p",{className:"text-3xl font-bold text-primary",children:m.length}),e("p",{className:"text-sm text-muted-foreground",children:"Active projects"})]}),o("div",{className:"bg-card p-6 rounded-lg border",children:[e("h3",{className:"text-lg font-semibold mb-2",children:"Team Members"}),e("p",{className:"text-3xl font-bold text-primary",children:w}),e("p",{className:"text-sm text-muted-foreground",children:"Collaborators"})]}),o("div",{className:"bg-card p-6 rounded-lg border",children:[e("h3",{className:"text-lg font-semibold mb-2",children:"Files"}),e("p",{className:"text-3xl font-bold text-primary",children:A}),e("p",{className:"text-sm text-muted-foreground",children:"Project files"})]})]}),e(a,{title:"Chat with your team",gradient:"bg-gradient-to-r from-pink-600 via-red-600 to-orange-600",primaryAction:{label:"Go",onClick:()=>s("chat")}})]});case"colleagues":return e(N,{initialColleagues:F,availableUsers:T,onColleagueAdd:S,onColleagueEdit:U,onColleagueDelete:I});case"chat":return o("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[o("section",{className:"text-center py-12",children:[e("h1",{className:"text-4xl font-bold mb-4",children:"Team Chat"}),o("p",{className:"text-xl text-muted-foreground mb-8",children:["Connect with your ",l.name," team members and collaborate in real-time."]})]}),e(a,{title:"Launch Full Chat Interface",description:"Access the complete chat experience with AI assistance.",gradient:"bg-gradient-to-r from-blue-600 via-purple-600 to-pink-600",primaryAction:{label:"Open Chat",onClick:()=>console.log("Open full chat interface")}})]});case"apps":return o("div",{className:"space-y-8",children:[e(a,{title:"Creative Apps Collection",description:"Discover our full suite of professional design and creative applications.",gradient:"bg-gradient-to-r from-pink-600 via-red-600 to-orange-600",primaryAction:{label:"Install Desktop App",onClick:()=>console.log("Install desktop app clicked")}}),o("section",{className:"space-y-4",children:[e("h2",{className:"text-2xl font-semibold",children:"New Releases"}),e("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4",children:r.filter(t=>t.new).map(t=>e(n,{app:t,showProgress:!0,onOpen:d,onFavorite:p},t.name))})]}),o("section",{className:"space-y-4",children:[e("h2",{className:"text-2xl font-semibold",children:"All Apps"}),e("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4",children:r.map(t=>e(n,{app:t,onOpen:d,onFavorite:p},t.name))})]})]});case"knowledge":return e(x,{});case"files":return o("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[e(a,{title:"Your Creative Files",description:"Access, manage, and share all your design files in one place.",gradient:"bg-gradient-to-r from-teal-600 via-cyan-600 to-blue-600",primaryAction:{label:"Upload Files",onClick:()=>console.log("Upload files clicked")}}),o("section",{className:"space-y-4",children:[e("div",{className:"flex items-center justify-between",children:e("h2",{className:"text-2xl font-semibold",children:"All Files"})}),e(u,{files:h,onFileClick:B})]})]});case"projects":return o("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[e(a,{title:"Project Management",description:"Organize your creative work into projects and collaborate with your team.",gradient:"bg-gradient-to-r from-purple-600 via-violet-600 to-indigo-600",primaryAction:{label:"New Project",onClick:P}}),o("section",{className:"space-y-4",children:[e("h2",{className:"text-2xl font-semibold",children:"Active Projects"}),e("div",{className:"grid grid-cols-1 gap-3 md:grid-cols-2 lg:grid-cols-3",children:m.map(t=>e(b,{project:t,onOpen:D,onShare:R},t.name))})]})]});case"learn":return o("div",{className:"space-y-8",children:[e(a,{title:"Learn & Grow",description:"Expand your creative skills with tutorials, courses, and resources.",gradient:"bg-gradient-to-r from-green-600 via-emerald-600 to-teal-600",primaryAction:{label:"Upgrade to Pro",onClick:()=>console.log("Upgrade to pro clicked")}}),o("section",{className:"space-y-4",children:[e("h2",{className:"text-2xl font-semibold",children:"Featured Tutorials"}),e("div",{className:"grid grid-cols-1 gap-6 md:grid-cols-2 lg:grid-cols-3",children:v.slice(0,3).map(t=>o("div",{className:"rounded-3xl border p-6",children:[e("h3",{className:"font-semibold mb-2",children:t.title}),e("p",{className:"text-sm text-muted-foreground mb-4",children:t.description}),o("div",{className:"flex items-center justify-between text-sm",children:[e("span",{children:t.duration}),e("span",{children:t.level})]})]},t.title))})]})]});default:return null}};return e(g,{sidebarItems:f,title:k,notifications:y,businessUnits:c,currentBusinessUnit:l,onBusinessUnitChange:L,activeTab:i,onTabChange:s,showTabs:!0,onActionClick:E,actionIcon:e(z,{className:"mr-2 h-4 w-4"}),actionText:"Start Chat",onNotificationRemove:H,onRemoveAll:M,children:e(Y,{mode:"wait",children:e(G.div,{className:"flex-1 h-full",initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:V()},i)})})}export{K as a};
@@ -1,4 +1,4 @@
1
1
  "use client";
2
2
  "use strict";
3
3
 
4
- import{a as d}from"./chunk-JMJUFHDA.mjs";import{a as D}from"./chunk-DCOFQFVJ.mjs";import{a as T}from"./chunk-HF33ZXKX.mjs";import{a as x}from"./chunk-GLZEHRPY.mjs";import{a as u,e as g}from"./chunk-YO3GQYRJ.mjs";import{a as A}from"./chunk-L5JPAKPM.mjs";import{b as F}from"./chunk-ZUA4KNIR.mjs";import{useEffect as V,useRef as j,useState as o}from"react";import{Plus as z,Search as G,File as W,Filter as q}from"lucide-react";import{motion as J,AnimatePresence as K}from"motion/react";import{jsx as e,jsxs as i}from"react/jsx-runtime";function Q({initialFiles:n=[],onFileAdd:k,onFileEdit:E,onFileDelete:S,onFileClick:H,onFileUpdate:c,compactView:m=!1,className:$}){let[I,h]=o(n),[s,v]=o(""),[y,O]=o("all"),[r,P]=o("all"),[B,C]=o(!1),b=j(""),M=l=>l.map(t=>`${t.id}-${new Date(t.createdAt).getTime()}-${new Date(t.updatedAt).getTime()}`).join("-");V(()=>{let l=M(n.map(t=>({...t,updatedAt:new Date().toISOString()})));l!==b.current&&(h(n),b.current=l)},[n]);let a=I.filter(l=>l.name.toLowerCase().includes(s.toLowerCase())),N=a.slice(0,10),U=a.filter(Boolean),w=()=>{C(!0)},X=l=>{E?.(l)},p=l=>{console.log("deleting file",l),h(t=>t.filter(R=>R.name!==l.name)),S?.(l.id.toString())},f=l=>{H?.(l)},L=()=>{v(""),O("all")};return i("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[e(K,{mode:"wait",children:e(J.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:i("div",{className:`space-y-6 ${$||""}`,children:[e(T,{title:"Files",description:"Manage and organize your files and documents.",gradient:"bg-gradient-to-r from-blue-600 via-indigo-600 to-purple-600",primaryAction:{label:"Upload file",onClick:w},secondaryAction:{label:"Download all",onClick:()=>console.log("Download all clicked")}}),e(u,{children:e(g,{className:"pt-6",children:i("div",{className:"flex flex-col md:flex-row gap-4",children:[e("div",{className:"flex-1",children:i("div",{className:"relative",children:[e(G,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),e(A,{placeholder:"Search files...",value:s,onChange:l=>v(l.target.value),className:"pl-9"})]})}),(s||y!=="all")&&i(F,{variant:"outline",onClick:L,className:"gap-2",children:[e(q,{className:"h-4 w-4"}),"Clear"]})]})})}),i("div",{className:"space-y-4",children:[e(x,{activeTab:r,onTabChange:P,tabOptions:[{value:"all",label:`All Files (${a.length})`},{value:"recent",label:`Recent (${N.length})`}],maxWidth:"500px",gridCols:3}),r==="all"&&e(d,{files:a,onFileClick:f,onFileUpdate:c,onFileDelete:p,showHeader:!m}),r==="recent"&&e(d,{files:N,onFileClick:f,onFileUpdate:c,onFileDelete:p,showHeader:!m}),r==="shared"&&e(d,{files:U,onFileClick:f,onFileUpdate:c,onFileDelete:p,showHeader:!m})]}),a.length===0&&e(u,{children:e(g,{className:"pt-6",children:i("div",{className:"text-center py-8",children:[e(W,{className:"h-12 w-12 text-muted-foreground mx-auto mb-4"}),e("h3",{className:"text-lg font-semibold mb-2",children:"No files found"}),e("p",{className:"text-muted-foreground mb-4",children:s||y!=="all"?"Try adjusting your filters to see more results.":"Get started by uploading your first file."}),i(F,{onClick:w,className:"gap-2",children:[e(z,{className:"h-4 w-4"}),"Upload File"]})]})})})]})},"files-view")}),e(D,{isOpen:B,onClose:()=>C(!1),onAddFile:k})]})}export{Q as a};
4
+ import{a as d}from"./chunk-PTRLJGWG.mjs";import{a as D}from"./chunk-DCOFQFVJ.mjs";import{a as T}from"./chunk-HF33ZXKX.mjs";import{a as x}from"./chunk-GLZEHRPY.mjs";import{a as u,e as g}from"./chunk-YO3GQYRJ.mjs";import{a as A}from"./chunk-L5JPAKPM.mjs";import{b as F}from"./chunk-ZUA4KNIR.mjs";import{useEffect as V,useRef as j,useState as o}from"react";import{Plus as z,Search as G,File as W,Filter as q}from"lucide-react";import{motion as J,AnimatePresence as K}from"motion/react";import{jsx as e,jsxs as i}from"react/jsx-runtime";function Q({initialFiles:n=[],onFileAdd:k,onFileEdit:E,onFileDelete:S,onFileClick:H,onFileUpdate:c,compactView:m=!1,className:$}){let[I,h]=o(n),[s,v]=o(""),[y,O]=o("all"),[r,P]=o("all"),[B,C]=o(!1),b=j(""),M=l=>l.map(t=>`${t.id}-${new Date(t.createdAt).getTime()}-${new Date(t.updatedAt).getTime()}`).join("-");V(()=>{let l=M(n.map(t=>({...t,updatedAt:new Date().toISOString()})));l!==b.current&&(h(n),b.current=l)},[n]);let a=I.filter(l=>l.name.toLowerCase().includes(s.toLowerCase())),N=a.slice(0,10),U=a.filter(Boolean),w=()=>{C(!0)},X=l=>{E?.(l)},p=l=>{console.log("deleting file",l),h(t=>t.filter(R=>R.name!==l.name)),S?.(l.id.toString())},f=l=>{H?.(l)},L=()=>{v(""),O("all")};return i("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[e(K,{mode:"wait",children:e(J.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:i("div",{className:`space-y-6 ${$||""}`,children:[e(T,{title:"Files",description:"Manage and organize your files and documents.",gradient:"bg-gradient-to-r from-blue-600 via-indigo-600 to-purple-600",primaryAction:{label:"Upload file",onClick:w},secondaryAction:{label:"Download all",onClick:()=>console.log("Download all clicked")}}),e(u,{children:e(g,{className:"pt-6",children:i("div",{className:"flex flex-col md:flex-row gap-4",children:[e("div",{className:"flex-1",children:i("div",{className:"relative",children:[e(G,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),e(A,{placeholder:"Search files...",value:s,onChange:l=>v(l.target.value),className:"pl-9"})]})}),(s||y!=="all")&&i(F,{variant:"outline",onClick:L,className:"gap-2",children:[e(q,{className:"h-4 w-4"}),"Clear"]})]})})}),i("div",{className:"space-y-4",children:[e(x,{activeTab:r,onTabChange:P,tabOptions:[{value:"all",label:`All Files (${a.length})`},{value:"recent",label:`Recent (${N.length})`}],maxWidth:"500px",gridCols:3}),r==="all"&&e(d,{files:a,onFileClick:f,onFileUpdate:c,onFileDelete:p,showHeader:!m}),r==="recent"&&e(d,{files:N,onFileClick:f,onFileUpdate:c,onFileDelete:p,showHeader:!m}),r==="shared"&&e(d,{files:U,onFileClick:f,onFileUpdate:c,onFileDelete:p,showHeader:!m})]}),a.length===0&&e(u,{children:e(g,{className:"pt-6",children:i("div",{className:"text-center py-8",children:[e(W,{className:"h-12 w-12 text-muted-foreground mx-auto mb-4"}),e("h3",{className:"text-lg font-semibold mb-2",children:"No files found"}),e("p",{className:"text-muted-foreground mb-4",children:s||y!=="all"?"Try adjusting your filters to see more results.":"Get started by uploading your first file."}),i(F,{onClick:w,className:"gap-2",children:[e(z,{className:"h-4 w-4"}),"Upload File"]})]})})})]})},"files-view")}),e(D,{isOpen:B,onClose:()=>C(!1),onAddFile:k})]})}export{Q as a};
@@ -1,4 +1,4 @@
1
1
  "use client";
2
2
  "use strict";
3
3
 
4
- import{a}from"./chunk-KOLP657S.mjs";import{a as f}from"./chunk-S3OBSLA5.mjs";import{a as g}from"./chunk-MDJREBVI.mjs";import{useState as l}from"react";import{User as P}from"lucide-react";import{jsx as e,jsxs as v}from"react/jsx-runtime";var b=[{id:"copilot",name:"Peronal Copilot",description:"Your personal AI assistant for all tasks",icon:e(P,{className:"h-4 w-4"}),color:"bg-orange-600",accentColor:"text-orange-600"}];function E({sidebarItems:r,children:h,title:U="Digital Colleagues",notifications:C=[],currentBusinessUnit:N=b[0],onBusinessUnitChange:B,onSearch:c,businessUnits:D=b,activeTab:x,onTabChange:T,showTabs:y=!1,onActionClick:A,actionIcon:R,actionText:S="Action",onNotificationRemove:k,onRemoveAll:w,logo:n="/headerlogo.png",appName:o="Nuvia",tagline:s="Collaboration Platform",sidebarInitiallyClosed:M=!1}){let[i,O]=l(!M),[d,t]=l(!1),[u,I]=l(N),m=p=>{I(p),B?.(p)};return v("div",{className:"flex h-full flex-col overflow-hidden rounded-xl bg-background w-[]",children:[d&&e("div",{className:"fixed inset-0 z-40 bg-black/50 md:hidden",onClick:()=>t(!1)}),e("div",{className:"md:hidden",children:e(a,{items:r,isOpen:d,isMobile:!0,onClose:()=>t(!1),currentBusinessUnit:u,onBusinessUnitChange:m,onSearch:c,logo:n,appName:o,tagline:s})}),e("div",{className:"hidden md:block",children:e(a,{items:r,isOpen:i,isMobile:!1,currentBusinessUnit:u,onBusinessUnitChange:m,onSearch:c,logo:n,appName:o,tagline:s})}),v("div",{className:g("min-h-screen fixed w-full transition-all duration-300 ease-in-out",i?"md:pl-64":"md:pl-0"),children:[e(f,{title:U,notifications:C,onToggleSidebar:()=>O(!i),onToggleMobileMenu:()=>t(!0),sidebarOpen:i,activeTab:x,onTabChange:T,showTabs:y,onActionClick:A,actionIcon:R,actionText:S,onNotificationRemove:k,onRemoveAll:w,logo:n,appName:o,tagline:s}),e("main",{className:"flex-1 p-0 flex flex-col h-[calc(100vh-4rem)] overflow-hidden",children:h})]})]})}export{E as a};
4
+ import{a as f}from"./chunk-RJGEVXIX.mjs";import{a}from"./chunk-RUMNILUG.mjs";import{a as g}from"./chunk-MDJREBVI.mjs";import{useState as l}from"react";import{User as P}from"lucide-react";import{jsx as e,jsxs as v}from"react/jsx-runtime";var b=[{id:"copilot",name:"Peronal Copilot",description:"Your personal AI assistant for all tasks",icon:e(P,{className:"h-4 w-4"}),color:"bg-orange-600",accentColor:"text-orange-600"}];function E({sidebarItems:r,children:h,title:U="Digital Colleagues",notifications:C=[],currentBusinessUnit:N=b[0],onBusinessUnitChange:B,onSearch:c,businessUnits:D=b,activeTab:x,onTabChange:T,showTabs:y=!1,onActionClick:A,actionIcon:R,actionText:S="Action",onNotificationRemove:k,onRemoveAll:w,logo:n="/headerlogo.png",appName:o="Nuvia",tagline:s="Collaboration Platform",sidebarInitiallyClosed:M=!1}){let[i,O]=l(!M),[d,t]=l(!1),[u,I]=l(N),m=p=>{I(p),B?.(p)};return v("div",{className:"flex h-full flex-col overflow-hidden rounded-xl bg-background w-[]",children:[d&&e("div",{className:"fixed inset-0 z-40 bg-black/50 md:hidden",onClick:()=>t(!1)}),e("div",{className:"md:hidden",children:e(a,{items:r,isOpen:d,isMobile:!0,onClose:()=>t(!1),currentBusinessUnit:u,onBusinessUnitChange:m,onSearch:c,logo:n,appName:o,tagline:s})}),e("div",{className:"hidden md:block",children:e(a,{items:r,isOpen:i,isMobile:!1,currentBusinessUnit:u,onBusinessUnitChange:m,onSearch:c,logo:n,appName:o,tagline:s})}),v("div",{className:g("min-h-screen fixed w-full transition-all duration-300 ease-in-out",i?"md:pl-64":"md:pl-0"),children:[e(f,{title:U,notifications:C,onToggleSidebar:()=>O(!i),onToggleMobileMenu:()=>t(!0),sidebarOpen:i,activeTab:x,onTabChange:T,showTabs:y,onActionClick:A,actionIcon:R,actionText:S,onNotificationRemove:k,onRemoveAll:w,logo:n,appName:o,tagline:s}),e("main",{className:"flex-1 p-0 flex flex-col h-[calc(100vh-4rem)] overflow-hidden",children:h})]})]})}export{E as a};
@@ -1,4 +1,4 @@
1
1
  "use client";
2
2
  "use strict";
3
3
 
4
- import{a as S}from"./chunk-5NIEZE7A.mjs";import{a as p}from"./chunk-HDLKX5L3.mjs";import{a as d,b as o,c as a,d as m,e as t,f as l}from"./chunk-76M7JE4D.mjs";import{a as u}from"./chunk-OYZDAMCS.mjs";import{b as n,d as b,f as c}from"./chunk-ZFUP5NVF.mjs";import{a as s}from"./chunk-4UIARERB.mjs";import{a as g}from"./chunk-WU3JMLSC.mjs";import{a as f}from"./chunk-BZAYEKYC.mjs";import{jsx as e,jsxs as r}from"react/jsx-runtime";function h({...i}){return r("div",{className:"bg-sidebar",children:[e(p,{isMenuOpen:!0,logoLight:f,logoDark:g,...i.header,className:"bg-sidebar",wide:!0}),r(n,{className:"top-24 mb-4 h-full max-h-[calc(100vh-3.5rem)] flex-1 flex-row overflow-y-clip",children:[e(S,{...i.sidebarLeft,className:"flex-none top-24"}),r(c,{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(s,{orientation:"vertical",className:"mr-2 h-4"}),e(d,{children:r(o,{children:[e(a,{className:"hidden md:block",children:e(m,{href:"#",children:"Building Your Application"})}),e(l,{className:"hidden md:block"}),e(a,{children:e(t,{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(u,{})]})}export{h as a};
4
+ import{a as S}from"./chunk-AGWQ5S2Z.mjs";import{a as p}from"./chunk-ZW24FGHA.mjs";import{a as d,b as o,c as a,d as m,e as t,f as l}from"./chunk-76M7JE4D.mjs";import{a as u}from"./chunk-OYZDAMCS.mjs";import{b as n,d as b,f as c}from"./chunk-PXLSH6S2.mjs";import{a as s}from"./chunk-4UIARERB.mjs";import{a as g}from"./chunk-WU3JMLSC.mjs";import{a as f}from"./chunk-BZAYEKYC.mjs";import{jsx as e,jsxs as r}from"react/jsx-runtime";function h({...i}){return r("div",{className:"bg-sidebar",children:[e(p,{isMenuOpen:!0,logoLight:f,logoDark:g,...i.header,className:"bg-sidebar",wide:!0}),r(n,{className:"top-24 mb-4 h-full max-h-[calc(100vh-3.5rem)] flex-1 flex-row overflow-y-clip",children:[e(S,{...i.sidebarLeft,className:"flex-none top-24"}),r(c,{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(s,{orientation:"vertical",className:"mr-2 h-4"}),e(d,{children:r(o,{children:[e(a,{className:"hidden md:block",children:e(m,{href:"#",children:"Building Your Application"})}),e(l,{className:"hidden md:block"}),e(a,{children:e(t,{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(u,{})]})}export{h as a};
@@ -1,4 +1,4 @@
1
1
  "use client";
2
2
  "use strict";
3
3
 
4
- import{a as g}from"./chunk-N25B5TQ5.mjs";import{a as b}from"./chunk-X2JWNPWT.mjs";import{a as y}from"./chunk-V4OXGW5U.mjs";import{a as f}from"./chunk-IXLFVFIK.mjs";import{a as v}from"./chunk-QTW33JYG.mjs";import{useState as q}from"react";import{ChevronDown as P}from"lucide-react";import{CalendarDays as R,Grid as k,PlusCircle as A,CheckSquare as V}from"lucide-react";import{useRouter as M}from"next/navigation";import{format as S,parseISO as T}from"date-fns";import{jsx as r,jsxs as s}from"react/jsx-runtime";function h(...t){return t.filter(Boolean).join(" ")}function K({holidays:t,currentUser:o,currentDate:w,leaveApprovals:x,employees:L,submitLeaveRequest:n,approveLeave:i,rejectLeave:m}){let[a,c]=q("Calendar View"),C=M(),D=!1,d=v.toUtcMidnight(T(w)),l=async e=>{let N=S(e,"dd-MM-yyyy"),p=new URL(window.location.href);return p.searchParams.set("date",N),C.push(p.toString()),{success:!0}};if(D)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 u=[{name:"Grid View",icon:k,current:a==="Grid View"},{name:"Calendar View",icon:R,current:a==="Calendar View"},{name:"Request Leave",icon:A,current:a==="Request Leave"},{name:"Approve Leave",icon:V,current:a==="Approve Leave"}];return s("div",{className:"container mx-auto p-4 h-full",children:[s("div",{className:"mb-8",children:[s("div",{className:"sm:hidden",children:[r("select",{value:a,onChange:e=>c(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:u.map(e=>r("option",{children:e.name},e.name))}),r(P,{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:u.map(e=>s("a",{onClick:()=>{(e.name!=="Approve Leave"||o.grade==="Manager"||o.grade==="Senior Manager"||o.grade==="Partner")&&c(e.name)},className:h(e.current?"border-accent text-accent":"border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700",e.name==="Approve Leave"&&o.grade!=="Manager"&&o.grade!=="Senior Manager"&&o.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:h(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(y,{currentDate:d,setCurrentDate:l,holidays:t,employees:L}),a==="Calendar View"&&r(b,{currentDate:d,setCurrentDate:l,holidays:t}),a==="Request Leave"&&r(f,{remainingDays:o.remainingLeaveDays,submitLeaveRequest:e=>n?n(e):Promise.resolve({success:!1,message:"Submit leave request function not provided"})}),a==="Approve Leave"&&r(g,{leaveRequests:x,onApprove:e=>i?i(e):Promise.resolve({success:!1,message:"Approve leave request function not provided"}),onReject:e=>m?m(e):Promise.resolve({success:!1,message:"Reject leave request function not provided"})})]})}export{K as a};
4
+ import{a as f}from"./chunk-IXLFVFIK.mjs";import{a as g}from"./chunk-N25B5TQ5.mjs";import{a as b}from"./chunk-X2JWNPWT.mjs";import{a as y}from"./chunk-V4OXGW5U.mjs";import{a as v}from"./chunk-QTW33JYG.mjs";import{useState as q}from"react";import{ChevronDown as P}from"lucide-react";import{CalendarDays as R,Grid as k,PlusCircle as A,CheckSquare as V}from"lucide-react";import{useRouter as M}from"next/navigation";import{format as S,parseISO as T}from"date-fns";import{jsx as r,jsxs as s}from"react/jsx-runtime";function h(...t){return t.filter(Boolean).join(" ")}function K({holidays:t,currentUser:o,currentDate:w,leaveApprovals:x,employees:L,submitLeaveRequest:n,approveLeave:i,rejectLeave:m}){let[a,c]=q("Calendar View"),C=M(),D=!1,d=v.toUtcMidnight(T(w)),l=async e=>{let N=S(e,"dd-MM-yyyy"),p=new URL(window.location.href);return p.searchParams.set("date",N),C.push(p.toString()),{success:!0}};if(D)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 u=[{name:"Grid View",icon:k,current:a==="Grid View"},{name:"Calendar View",icon:R,current:a==="Calendar View"},{name:"Request Leave",icon:A,current:a==="Request Leave"},{name:"Approve Leave",icon:V,current:a==="Approve Leave"}];return s("div",{className:"container mx-auto p-4 h-full",children:[s("div",{className:"mb-8",children:[s("div",{className:"sm:hidden",children:[r("select",{value:a,onChange:e=>c(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:u.map(e=>r("option",{children:e.name},e.name))}),r(P,{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:u.map(e=>s("a",{onClick:()=>{(e.name!=="Approve Leave"||o.grade==="Manager"||o.grade==="Senior Manager"||o.grade==="Partner")&&c(e.name)},className:h(e.current?"border-accent text-accent":"border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700",e.name==="Approve Leave"&&o.grade!=="Manager"&&o.grade!=="Senior Manager"&&o.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:h(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(y,{currentDate:d,setCurrentDate:l,holidays:t,employees:L}),a==="Calendar View"&&r(b,{currentDate:d,setCurrentDate:l,holidays:t}),a==="Request Leave"&&r(f,{remainingDays:o.remainingLeaveDays,submitLeaveRequest:e=>n?n(e):Promise.resolve({success:!1,message:"Submit leave request function not provided"})}),a==="Approve Leave"&&r(g,{leaveRequests:x,onApprove:e=>i?i(e):Promise.resolve({success:!1,message:"Approve leave request function not provided"}),onReject:e=>m?m(e):Promise.resolve({success:!1,message:"Reject leave request function not provided"})})]})}export{K as a};
@@ -1 +1 @@
1
- import{f as o}from"./chunk-ZGDSCGLC.mjs";import n from"next/image";import{jsx as r,jsxs as m}from"react/jsx-runtime";var s=({media:e})=>{if(e&&typeof e=="object"){let{alt:t,filename:a,height:i,url:l,width:c}=e;return r(n,{className:"mix-blend-overlay opacity-50",alt:t||"",fill:!0,priority:!0,src:l||"",width:c||0,height:i||0,style:{objectFit:"cover"}})}else if(e&&typeof e=="string")return r("div",{children:r(n,{className:"mix-blend-overlay opacity-50",alt:"",fill:!0,priority:!0,src:e,style:{objectFit:"cover"}})});return null},p=({links:e,media:t,children:a,richText:i})=>m("div",{className:"relative bg-brand-one pb-12 mt-20 pt-10",children:[t&&r(s,{media:t}),r("div",{className:"mx-0 min-w-full relative z-9",children:r("div",{className:"container text-brand-one-foreground",children:a||i&&r(o,{className:"prose-headings:text-brand-one-foreground prose-p:text-brand-one-foreground",content:i,enableProse:!0,enableGutter:!1})})})]});export{p as a};
1
+ import{f as o}from"./chunk-VCKKDEC5.mjs";import n from"next/image";import{jsx as r,jsxs as m}from"react/jsx-runtime";var s=({media:e})=>{if(e&&typeof e=="object"){let{alt:t,filename:a,height:i,url:l,width:c}=e;return r(n,{className:"mix-blend-overlay opacity-50",alt:t||"",fill:!0,priority:!0,src:l||"",width:c||0,height:i||0,style:{objectFit:"cover"}})}else if(e&&typeof e=="string")return r("div",{children:r(n,{className:"mix-blend-overlay opacity-50",alt:"",fill:!0,priority:!0,src:e,style:{objectFit:"cover"}})});return null},p=({links:e,media:t,children:a,richText:i})=>m("div",{className:"relative bg-brand-one pb-12 mt-20 pt-10",children:[t&&r(s,{media:t}),r("div",{className:"mx-0 min-w-full relative z-9",children:r("div",{className:"container text-brand-one-foreground",children:a||i&&r(o,{className:"prose-headings:text-brand-one-foreground prose-p:text-brand-one-foreground",content:i,enableProse:!0,enableGutter:!1})})})]});export{p as a};
@@ -1,5 +1,5 @@
1
1
  "use client";
2
2
  "use strict";
3
3
 
4
- import{b as w,c as C}from"./chunk-SG5BHIQF.mjs";import{b as y}from"./chunk-DNZWIOML.mjs";import{a as P}from"./chunk-MDJREBVI.mjs";import{a as b}from"./chunk-Q3G5UAAD.mjs";import{useEffect as d,useRef as s,useState as H,useCallback as x}from"react";import{Previewer as p}from"pagedjs";import{Fragment as N,jsx as n,jsxs as l}from"react/jsx-runtime";function T(r){var e=document.createElement("div");e.style.display="block",e.style.height=r,document.body.appendChild(e);var i=parseFloat(window.getComputedStyle(e,null).height);return e.parentNode&&e.parentNode.removeChild(e),Math.floor(i)}var m=r=>{let e=document.createElement("div");e.style.height="1mm",document.body.appendChild(e);let i=parseFloat(window.getComputedStyle(e).height);return document.body.removeChild(e),Math.floor(r/i)},F=({page:r,layout:e="portrait",logoImage:i})=>e==="flow"?n(E,{page:r,layout:e,logoImage:i}):n(B,{page:r,layout:e,logoImage:i}),E=({page:r,layout:e="portrait",logoImage:i})=>{let{contentWithIds:c}=b(r),u=s(null),a=s(null),h=s(new p),f={id:"0000000000000000000",blockName:null,columns:[],blockType:"content",theme:{settings:{theme:"dark",background:"solid",overlay:!0}}};d(()=>{let o=document.getElementById("printable-content");if(o){let t=document.createElement("style");return t.textContent=`@page { size: ${m(o.offsetWidth)}mm ${m(o.offsetHeight)}mm ; margin: 0mm; width: ${m(o.offsetWidth)}mm }; .container : { max-width: ${m(o.offsetWidth)}mm; } .container : { max-width: 100%; }; html body * :not(#prinable-content, #printable-content *) { visibility: hidden !important; }`,document.head.appendChild(t),()=>{document.head.removeChild(t)}}},[e]);let k=x(()=>{if(!a.current)return;a.current&&(a.current.innerHTML="");let o=document.getElementById("printable-content");o&&h.current.preview(document.getElementById("printable-content").innerHTML,[`@page { size: ${m(o.offsetWidth)}mm ${m(o.offsetHeight)}mm ; margin: 0mm; }; .container : { max-width: 100%; }; body { zoom: 100%;}`],a.current).catch(t=>console.error("Paged.js error:",t))},[e]);d(()=>{h.current=new p},[k,e]);let g=[f,...c];return l("div",{children:[n("div",{className:"w-[1123px] print:w-[1123px]",children:l("div",{id:"printable-content",ref:u,children:[g.map((o,t)=>n(N,{children:t===0?n("section",{className:"title-page w-full h-full",children:n(C,{hero:r.hero,title:r.title})},t):l("section",{className:"normal-page overflow-hidden",children:[o.blockName&&n(w,{title:o.blockName}),n(y,{blocks:[o],fill:!0})]},t)})),n("section",{className:"normal-page",children:l("div",{className:`w-full py-2 px-8 flex justify-between items-center
4
+ import{b as w,c as C}from"./chunk-FQ56UUMT.mjs";import{b as y}from"./chunk-23KBAZ3A.mjs";import{a as P}from"./chunk-MDJREBVI.mjs";import{a as b}from"./chunk-Q3G5UAAD.mjs";import{useEffect as d,useRef as s,useState as H,useCallback as x}from"react";import{Previewer as p}from"pagedjs";import{Fragment as N,jsx as n,jsxs as l}from"react/jsx-runtime";function T(r){var e=document.createElement("div");e.style.display="block",e.style.height=r,document.body.appendChild(e);var i=parseFloat(window.getComputedStyle(e,null).height);return e.parentNode&&e.parentNode.removeChild(e),Math.floor(i)}var m=r=>{let e=document.createElement("div");e.style.height="1mm",document.body.appendChild(e);let i=parseFloat(window.getComputedStyle(e).height);return document.body.removeChild(e),Math.floor(r/i)},F=({page:r,layout:e="portrait",logoImage:i})=>e==="flow"?n(E,{page:r,layout:e,logoImage:i}):n(B,{page:r,layout:e,logoImage:i}),E=({page:r,layout:e="portrait",logoImage:i})=>{let{contentWithIds:c}=b(r),u=s(null),a=s(null),h=s(new p),f={id:"0000000000000000000",blockName:null,columns:[],blockType:"content",theme:{settings:{theme:"dark",background:"solid",overlay:!0}}};d(()=>{let o=document.getElementById("printable-content");if(o){let t=document.createElement("style");return t.textContent=`@page { size: ${m(o.offsetWidth)}mm ${m(o.offsetHeight)}mm ; margin: 0mm; width: ${m(o.offsetWidth)}mm }; .container : { max-width: ${m(o.offsetWidth)}mm; } .container : { max-width: 100%; }; html body * :not(#prinable-content, #printable-content *) { visibility: hidden !important; }`,document.head.appendChild(t),()=>{document.head.removeChild(t)}}},[e]);let k=x(()=>{if(!a.current)return;a.current&&(a.current.innerHTML="");let o=document.getElementById("printable-content");o&&h.current.preview(document.getElementById("printable-content").innerHTML,[`@page { size: ${m(o.offsetWidth)}mm ${m(o.offsetHeight)}mm ; margin: 0mm; }; .container : { max-width: 100%; }; body { zoom: 100%;}`],a.current).catch(t=>console.error("Paged.js error:",t))},[e]);d(()=>{h.current=new p},[k,e]);let g=[f,...c];return l("div",{children:[n("div",{className:"w-[1123px] print:w-[1123px]",children:l("div",{id:"printable-content",ref:u,children:[g.map((o,t)=>n(N,{children:t===0?n("section",{className:"title-page w-full h-full",children:n(C,{hero:r.hero,title:r.title})},t):l("section",{className:"normal-page overflow-hidden",children:[o.blockName&&n(w,{title:o.blockName}),n(y,{blocks:[o],fill:!0})]},t)})),n("section",{className:"normal-page",children:l("div",{className:`w-full py-2 px-8 flex justify-between items-center
5
5
  dark bg-background text-primary`,children:[l("div",{className:"flex px-6 items-center space-x-2",children:[i&&n("img",{src:i.src,alt:"Cortex Reply Logo",className:"h-8"}),n("span",{className:"pl-12 text-sm",children:"Power up your people"})]}),n("a",{href:"https://cortexreply.com",className:"text-sm hover:underline",children:"cortexreply.com"})]})})]})}),n("div",{ref:a,className:"preview-container"})]})},B=({page:r,layout:e="portrait"})=>{let{contentWithIds:i}=b(r),c=s(null),u=s(null),a=s(new p),[h,f]=H(0),g=[{id:"0000000000000000000",blockName:null,columns:[],blockType:"content",theme:{settings:{theme:"dark",background:"solid",overlay:!0}}},...i],o=x(()=>{c.current&&(c.current&&(c.current.innerHTML=""),a.current.preview(document.getElementById("printable-content").innerHTML,["./print.css",e==="landscape"?"./landscape.css":"./portrait.css"],c.current).then(t=>f(t.pageCount)).catch(t=>console.error("Paged.js error:",t)))},[e]);return d(()=>{a.current=new p,o()},[o,e]),d(()=>{let t=document.createElement("style");return t.textContent=`@page { size: A4 ${e} ; margin: 0mm; };`,document.head.appendChild(t),()=>{document.head.removeChild(t)}},[]),l("div",{className:"pagedjs-container",children:[n("div",{id:"printable-content",ref:u,style:{display:"none"},className:"pagedjs-content",children:g.map((t,v)=>n(N,{children:v===0?n("section",{className:"pagedjs-section title-page w-full h-full",children:n(C,{hero:r.hero,title:r.title})},v):l("section",{className:P("pagedjs-section normal-page h-[699px]",`h-[${T("185mm")}px]`,t.theme?.settings?.theme==="dark"?"dark":"light"),children:[t.blockName&&n(w,{title:t.blockName}),n(y,{blocks:[t],fill:!0})]},v)}))}),n("div",{ref:c,className:"preview-container"})]})};export{F as a,E as b,B as c};
@@ -1,4 +1,4 @@
1
1
  "use client";
2
2
  "use strict";
3
3
 
4
- import{a as $}from"./chunk-RK5JHVD4.mjs";import{a as O}from"./chunk-FT3AE7L2.mjs";import{a as H}from"./chunk-L5JPAKPM.mjs";import{motion as v}from"motion/react";import{ChevronRight as A,File as M,FileText as K,Search as Q}from"lucide-react";import{useState as N,useMemo as P,useEffect as T}from"react";import{Fragment as E,jsx as e,jsxs as r}from"react/jsx-runtime";function j({label:x,documents:a,children:l,level:p,onDocumentClick:w,selectedDocumentId:f,showDocumentCount:y=!0}){let[c,i]=N(p===0),D=l&&Object.keys(l).length>0,u=a.length+(l?Object.values(l).reduce((t,n)=>t+n.documents.length,0):0),b=t=>{switch(t){case"markdown":case"mdx":return e(K,{className:"h-3.5 w-3.5 text-muted-foreground"});case"richText":return e(M,{className:"h-3.5 w-3.5 text-muted-foreground"});default:return e(M,{className:"h-3.5 w-3.5 text-muted-foreground"})}},g=t=>{let n=["bg-primary","bg-secondary","bg-accent","bg-chart-1"];return n[t%n.length]};return r("div",{className:"space-y-1",children:[(D||a.length>0)&&r(v.div,{className:`group flex items-center gap-3 p-3 rounded-xl cursor-pointer transition-all duration-200 ${c?"bg-card shadow-sm border border-border":"hover:bg-muted/50 hover:shadow-sm"}`,style:{marginLeft:`${p*20}px`},onClick:()=>i(!c),whileHover:{scale:1.01},whileTap:{scale:.99},children:[e("div",{className:`w-1 h-6 rounded-full ${g(p)}`}),e(v.div,{animate:{rotate:c?90:0},transition:{duration:.2},className:"flex-shrink-0",children:e(A,{className:"h-4 w-4 text-muted-foreground"})}),r("div",{className:"flex-1 flex items-center justify-between min-w-0",children:[e("div",{className:"flex items-center gap-2 min-w-0",children:e("span",{className:"font-medium text-foreground truncate",children:x})}),y&&u>0&&e("div",{className:"flex-shrink-0 ml-2",children:e("span",{className:"inline-flex items-center justify-center w-6 h-6 text-xs font-medium bg-muted text-muted-foreground rounded-full",children:u})})]})]}),e(v.div,{initial:!1,animate:{height:c?"auto":0,opacity:c?1:0},transition:{duration:.2,ease:"easeInOut"},className:"overflow-hidden",children:r("div",{className:"pt-2 space-y-1",children:[a.map((t,n)=>r(v.div,{initial:{opacity:0,x:-10},animate:{opacity:1,x:0},transition:{delay:n*.05,duration:.2},className:`group flex items-center gap-3 p-2.5 mx-2 rounded-lg cursor-pointer transition-all duration-150 ${f===t.id?"bg-primary/10 border-l-2 border-primary shadow-sm":"hover:bg-muted/50 hover:translate-x-1"}`,style:{marginLeft:`${p*20+20}px`},onClick:()=>w?.(t),whileHover:{scale:1.01},whileTap:{scale:.99},children:[e("div",{className:"flex-shrink-0",children:b(t.format)}),r("div",{className:"flex-1 min-w-0",children:[e("p",{className:`text-sm truncate transition-colors ${f===t.id?"text-primary font-medium":"text-foreground group-hover:text-foreground"}`,children:t.title}),t.description&&e("p",{className:"text-xs text-muted-foreground truncate mt-0.5",children:t.description})]}),t.tags&&t.tags.length>0&&e("div",{className:"flex-shrink-0",children:e("span",{className:"inline-flex items-center px-2 py-1 rounded-md text-xs font-medium bg-muted text-muted-foreground group-hover:bg-muted/80 transition-colors",children:t.tags[0]})})]},t.id)),l&&Object.entries(l).map(([t,n])=>e(j,{label:t,documents:n.documents,children:n.children,level:p+1,onDocumentClick:w,selectedDocumentId:f,showDocumentCount:y},t))]})})]})}function Z({documents:x,menuConfig:a,onDocumentClick:l,onDocumentShare:p,onDocumentUpdate:w,selectedDocumentId:f,className:y,editable:c=!0}){let[i,D]=N(""),[u,b]=N(null),[g,t]=N(x);T(()=>{t(x)},[x]),T(()=>{if(u?.id){let o=g.find(s=>s.id===u.id);o&&b(o)}},[g]);let n=P(()=>i?g.filter(o=>o.title.toLowerCase().includes(i.toLowerCase())||o.description?.toLowerCase().includes(i.toLowerCase())||o.tags?.some(s=>s.toLowerCase().includes(i.toLowerCase()))||Object.values(o.metadata||{}).some(s=>String(s).toLowerCase().includes(i.toLowerCase()))):g,[g,i]),S=P(()=>{let o=(s,L)=>{if(L.length===0)return{};let[F,...B]=L;return s.reduce((d,C)=>{let U=C.metadata?.[F]||"Uncategorized",m=String(U);if(d[m]||(d[m]={documents:[],children:{}}),B.length===0)d[m].documents.push(C);else{let k=o([C],B),h=Object.keys(k)[0];h&&(d[m].children||(d[m].children={}),d[m].children[h]?d[m].children[h].documents.push(...k[h].documents):d[m].children[h]=k[h])}return d},{})};return o(n,a.groupBy)},[n,a.groupBy]),I=o=>{b(o),l?.(o)};return r("div",{className:`flex h-full ${y||""}`,children:[r("div",{className:"w-1/3 border-r border-border bg-muted/20",children:[e("div",{className:"p-6 border-b border-border",children:r("div",{className:"relative",children:[e("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",children:e(Q,{className:"h-4 w-4 text-muted-foreground"})}),e(H,{placeholder:"Search knowledge base...",value:i,onChange:o=>D(o.target.value),className:"pl-10 bg-background/80 border-border focus:border-primary/50 focus:ring-primary/20 rounded-xl h-11 text-sm placeholder:text-muted-foreground"})]})}),e(O,{className:"h-[calc(100%-100px)]",children:e("div",{className:"p-4 space-y-3",children:a.groupBy.length===0?e(E,{children:e(j,{label:"Document",documents:n,level:0,onDocumentClick:I,selectedDocumentId:f,showDocumentCount:a.showDocumentCount},"Document")}):r(E,{children:[Object.entries(S).map(([o,s])=>e(j,{label:o,documents:s.documents,children:s.children,level:0,onDocumentClick:I,selectedDocumentId:f,showDocumentCount:a.showDocumentCount},o)),Object.keys(S).length===0&&r(v.div,{initial:{opacity:0},animate:{opacity:1},className:"text-center text-muted-foreground py-12",children:[e("div",{className:"w-16 h-16 mx-auto mb-4 rounded-full bg-muted flex items-center justify-center",children:e(K,{className:"h-8 w-8 text-muted-foreground"})}),e("p",{className:"text-sm font-medium",children:"No documents found"}),e("p",{className:"text-xs mt-1",children:"Try adjusting your search terms"})]})]})})})]}),e("div",{className:"flex-1 bg-background overflow-scroll",children:u?e($,{document:u,onDocumentUpdate:w,editable:c}):e("div",{className:"h-full flex items-center justify-center text-center",children:r(v.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.4},className:"max-w-sm",children:[e("div",{className:"w-20 h-20 mx-auto mb-6 rounded-full bg-primary/10 flex items-center justify-center",children:e(K,{className:"h-10 w-10 text-primary"})}),e("h3",{className:"text-xl font-semibold text-foreground mb-2",children:"Select a document"}),e("p",{className:"text-muted-foreground leading-relaxed",children:"Choose any document from the knowledge base to view its content and details"})]})})})]})}export{Z as a};
4
+ import{a as $}from"./chunk-Q3F3NCXM.mjs";import{a as O}from"./chunk-FT3AE7L2.mjs";import{a as H}from"./chunk-L5JPAKPM.mjs";import{motion as v}from"motion/react";import{ChevronRight as A,File as M,FileText as K,Search as Q}from"lucide-react";import{useState as N,useMemo as P,useEffect as T}from"react";import{Fragment as E,jsx as e,jsxs as r}from"react/jsx-runtime";function j({label:x,documents:a,children:l,level:p,onDocumentClick:w,selectedDocumentId:f,showDocumentCount:y=!0}){let[c,i]=N(p===0),D=l&&Object.keys(l).length>0,u=a.length+(l?Object.values(l).reduce((t,n)=>t+n.documents.length,0):0),b=t=>{switch(t){case"markdown":case"mdx":return e(K,{className:"h-3.5 w-3.5 text-muted-foreground"});case"richText":return e(M,{className:"h-3.5 w-3.5 text-muted-foreground"});default:return e(M,{className:"h-3.5 w-3.5 text-muted-foreground"})}},g=t=>{let n=["bg-primary","bg-secondary","bg-accent","bg-chart-1"];return n[t%n.length]};return r("div",{className:"space-y-1",children:[(D||a.length>0)&&r(v.div,{className:`group flex items-center gap-3 p-3 rounded-xl cursor-pointer transition-all duration-200 ${c?"bg-card shadow-sm border border-border":"hover:bg-muted/50 hover:shadow-sm"}`,style:{marginLeft:`${p*20}px`},onClick:()=>i(!c),whileHover:{scale:1.01},whileTap:{scale:.99},children:[e("div",{className:`w-1 h-6 rounded-full ${g(p)}`}),e(v.div,{animate:{rotate:c?90:0},transition:{duration:.2},className:"flex-shrink-0",children:e(A,{className:"h-4 w-4 text-muted-foreground"})}),r("div",{className:"flex-1 flex items-center justify-between min-w-0",children:[e("div",{className:"flex items-center gap-2 min-w-0",children:e("span",{className:"font-medium text-foreground truncate",children:x})}),y&&u>0&&e("div",{className:"flex-shrink-0 ml-2",children:e("span",{className:"inline-flex items-center justify-center w-6 h-6 text-xs font-medium bg-muted text-muted-foreground rounded-full",children:u})})]})]}),e(v.div,{initial:!1,animate:{height:c?"auto":0,opacity:c?1:0},transition:{duration:.2,ease:"easeInOut"},className:"overflow-hidden",children:r("div",{className:"pt-2 space-y-1",children:[a.map((t,n)=>r(v.div,{initial:{opacity:0,x:-10},animate:{opacity:1,x:0},transition:{delay:n*.05,duration:.2},className:`group flex items-center gap-3 p-2.5 mx-2 rounded-lg cursor-pointer transition-all duration-150 ${f===t.id?"bg-primary/10 border-l-2 border-primary shadow-sm":"hover:bg-muted/50 hover:translate-x-1"}`,style:{marginLeft:`${p*20+20}px`},onClick:()=>w?.(t),whileHover:{scale:1.01},whileTap:{scale:.99},children:[e("div",{className:"flex-shrink-0",children:b(t.format)}),r("div",{className:"flex-1 min-w-0",children:[e("p",{className:`text-sm truncate transition-colors ${f===t.id?"text-primary font-medium":"text-foreground group-hover:text-foreground"}`,children:t.title}),t.description&&e("p",{className:"text-xs text-muted-foreground truncate mt-0.5",children:t.description})]}),t.tags&&t.tags.length>0&&e("div",{className:"flex-shrink-0",children:e("span",{className:"inline-flex items-center px-2 py-1 rounded-md text-xs font-medium bg-muted text-muted-foreground group-hover:bg-muted/80 transition-colors",children:t.tags[0]})})]},t.id)),l&&Object.entries(l).map(([t,n])=>e(j,{label:t,documents:n.documents,children:n.children,level:p+1,onDocumentClick:w,selectedDocumentId:f,showDocumentCount:y},t))]})})]})}function Z({documents:x,menuConfig:a,onDocumentClick:l,onDocumentShare:p,onDocumentUpdate:w,selectedDocumentId:f,className:y,editable:c=!0}){let[i,D]=N(""),[u,b]=N(null),[g,t]=N(x);T(()=>{t(x)},[x]),T(()=>{if(u?.id){let o=g.find(s=>s.id===u.id);o&&b(o)}},[g]);let n=P(()=>i?g.filter(o=>o.title.toLowerCase().includes(i.toLowerCase())||o.description?.toLowerCase().includes(i.toLowerCase())||o.tags?.some(s=>s.toLowerCase().includes(i.toLowerCase()))||Object.values(o.metadata||{}).some(s=>String(s).toLowerCase().includes(i.toLowerCase()))):g,[g,i]),S=P(()=>{let o=(s,L)=>{if(L.length===0)return{};let[F,...B]=L;return s.reduce((d,C)=>{let U=C.metadata?.[F]||"Uncategorized",m=String(U);if(d[m]||(d[m]={documents:[],children:{}}),B.length===0)d[m].documents.push(C);else{let k=o([C],B),h=Object.keys(k)[0];h&&(d[m].children||(d[m].children={}),d[m].children[h]?d[m].children[h].documents.push(...k[h].documents):d[m].children[h]=k[h])}return d},{})};return o(n,a.groupBy)},[n,a.groupBy]),I=o=>{b(o),l?.(o)};return r("div",{className:`flex h-full ${y||""}`,children:[r("div",{className:"w-1/3 border-r border-border bg-muted/20",children:[e("div",{className:"p-6 border-b border-border",children:r("div",{className:"relative",children:[e("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",children:e(Q,{className:"h-4 w-4 text-muted-foreground"})}),e(H,{placeholder:"Search knowledge base...",value:i,onChange:o=>D(o.target.value),className:"pl-10 bg-background/80 border-border focus:border-primary/50 focus:ring-primary/20 rounded-xl h-11 text-sm placeholder:text-muted-foreground"})]})}),e(O,{className:"h-[calc(100%-100px)]",children:e("div",{className:"p-4 space-y-3",children:a.groupBy.length===0?e(E,{children:e(j,{label:"Document",documents:n,level:0,onDocumentClick:I,selectedDocumentId:f,showDocumentCount:a.showDocumentCount},"Document")}):r(E,{children:[Object.entries(S).map(([o,s])=>e(j,{label:o,documents:s.documents,children:s.children,level:0,onDocumentClick:I,selectedDocumentId:f,showDocumentCount:a.showDocumentCount},o)),Object.keys(S).length===0&&r(v.div,{initial:{opacity:0},animate:{opacity:1},className:"text-center text-muted-foreground py-12",children:[e("div",{className:"w-16 h-16 mx-auto mb-4 rounded-full bg-muted flex items-center justify-center",children:e(K,{className:"h-8 w-8 text-muted-foreground"})}),e("p",{className:"text-sm font-medium",children:"No documents found"}),e("p",{className:"text-xs mt-1",children:"Try adjusting your search terms"})]})]})})})]}),e("div",{className:"flex-1 bg-background overflow-scroll",children:u?e($,{document:u,onDocumentUpdate:w,editable:c}):e("div",{className:"h-full flex items-center justify-center text-center",children:r(v.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.4},className:"max-w-sm",children:[e("div",{className:"w-20 h-20 mx-auto mb-6 rounded-full bg-primary/10 flex items-center justify-center",children:e(K,{className:"h-10 w-10 text-primary"})}),e("h3",{className:"text-xl font-semibold text-foreground mb-2",children:"Select a document"}),e("p",{className:"text-muted-foreground leading-relaxed",children:"Choose any document from the knowledge base to view its content and details"})]})})})]})}export{Z as a};
@@ -1 +1 @@
1
- import{f as c}from"./chunk-ZGDSCGLC.mjs";import{a as t}from"./chunk-MDJREBVI.mjs";import n from"next/image";import{jsx as e,jsxs as l}from"react/jsx-runtime";function g({image:a,title:i,content:s,link:o,theme:r}){return l("section",{className:"container relative",children:[e("div",{className:t("absolute mt-[50%] w-full h-full",r==="dark"?"bg-white":"bg-black")}),e("div",{className:t("flex flex-col md:flex-row items-center justify-between gap-12 px-6 md:px-16 py-16 bg-background",r,r==="dark"&&"bg-black clip-custom-top-r"),children:l("div",{className:"w-full flex flex-row items-center justify-center",children:[l("div",{className:t("w-full md:w-1/2 max-w-lg text-left",r==="dark"&&"mt-48"),children:[e("h2",{className:"text-3xl md:text-5xl text-primary",children:i}),e("p",{className:"mt-4 text-gray-700 text-lg",children:s&&e(c,{enableGutter:!1,content:s,enableProse:!1,className:t("prose prose-headings:text-gray-700 prose-p:text-gray-700")})}),e("button",{className:"mt-6 px-6 py-3 border border-1 border-accent text-foreground bg-background rounded-full text-base hover:bg-accent hover:text-white transition",children:e("a",{href:o.url||"#",children:o.label||"Learn more"})})]}),e("div",{className:"w-full md:w-1/2 flex justify-center",children:a&&a.url&&e(n,{src:a.url,alt:a.alt||`Image of ${i}`,width:400,height:400,className:"max-w-full"})})]})})]})}export{g as a};
1
+ import{f as c}from"./chunk-VCKKDEC5.mjs";import{a as t}from"./chunk-MDJREBVI.mjs";import n from"next/image";import{jsx as e,jsxs as l}from"react/jsx-runtime";function g({image:a,title:i,content:s,link:o,theme:r}){return l("section",{className:"container relative",children:[e("div",{className:t("absolute mt-[50%] w-full h-full",r==="dark"?"bg-white":"bg-black")}),e("div",{className:t("flex flex-col md:flex-row items-center justify-between gap-12 px-6 md:px-16 py-16 bg-background",r,r==="dark"&&"bg-black clip-custom-top-r"),children:l("div",{className:"w-full flex flex-row items-center justify-center",children:[l("div",{className:t("w-full md:w-1/2 max-w-lg text-left",r==="dark"&&"mt-48"),children:[e("h2",{className:"text-3xl md:text-5xl text-primary",children:i}),e("p",{className:"mt-4 text-gray-700 text-lg",children:s&&e(c,{enableGutter:!1,content:s,enableProse:!1,className:t("prose prose-headings:text-gray-700 prose-p:text-gray-700")})}),e("button",{className:"mt-6 px-6 py-3 border border-1 border-accent text-foreground bg-background rounded-full text-base hover:bg-accent hover:text-white transition",children:e("a",{href:o.url||"#",children:o.label||"Learn more"})})]}),e("div",{className:"w-full md:w-1/2 flex justify-center",children:a&&a.url&&e(n,{src:a.url,alt:a.alt||`Image of ${i}`,width:400,height:400,className:"max-w-full"})})]})})]})}export{g as a};
@@ -1,4 +1,4 @@
1
1
  "use client";
2
2
  "use strict";
3
3
 
4
- import{a as O}from"./chunk-GAU24H4A.mjs";import{a as le}from"./chunk-SRXU4X35.mjs";import{a as ae}from"./chunk-PKI57UXP.mjs";import{a as w}from"./chunk-KHJKOKJN.mjs";import{a as I}from"./chunk-IKVDX3WJ.mjs";import{a as ee}from"./chunk-JKVQOOCZ.mjs";import{a as Z}from"./chunk-HF33ZXKX.mjs";import{a as te}from"./chunk-R422HRMQ.mjs";import{a as _}from"./chunk-GLZEHRPY.mjs";import{a as E,c as H,d as $,g as F,i as u}from"./chunk-YFAZQYK4.mjs";import{a as g,b as h,c as b,e as c}from"./chunk-YO3GQYRJ.mjs";import{a as Y}from"./chunk-L5JPAKPM.mjs";import{b as k}from"./chunk-ZUA4KNIR.mjs";import{useEffect as ve,useState as o}from"react";import{Plus as ye,Search as he,Users as ie,Bot as be,User as we,Filter as xe}from"lucide-react";import{motion as Se,AnimatePresence as Ne}from"motion/react";import{jsx as l,jsxs as a}from"react/jsx-runtime";function De({initialColleagues:x,onColleagueAdd:S,onColleagueEdit:K,onColleagueDelete:oe,compactView:n=!1,departments:ne=["Design","Engineering","Marketing","Product","Sales","Operations"],className:re,availableUsers:L=[],existingDigitalColleagues:P=[],availableKnowledgeDocuments:j=[],availableCapabilities:M=[],availableModels:B=[]}){let[p,r]=o(x||[]),[s,G]=o(""),[N,W]=o("all"),[D,q]=o("all"),[v,se]=o("all"),[z,C]=o(null),[T,y]=o(null);ve(()=>{r(x||[])},[x]);let de=Array.isArray(L)?L:[],me=Array.isArray(P)?P:[],[d,t]=o("main"),f=p.filter(e=>!e||!e?.name?!1:e?.name.toLowerCase().includes(s.toLowerCase())||e.type==="human"&&e.email?.toLowerCase().includes(s.toLowerCase())||e.type==="digital"&&e.jobDescription?.toLowerCase().includes(s.toLowerCase())),J=f.filter(e=>e.type==="human"),Q=f.filter(e=>e.type==="digital"),R=()=>{t("typeSelection")},A=e=>{e.type==="digital"&&(C(e),t("form")),K?.(e)},U=e=>{e.type==="digital"&&(y(e),t("view"))},ge=e=>{if(!e||!e.id){console.error("Invalid user provided to handleUserSelect:",e);return}let i={id:`human-${Date.now()}`,type:"human",name:e?.name||"Unknown User",email:e?.email||"",updatedAt:e.updatedAt,createdAt:e.createdAt,accounts:e.accounts};r(m=>[...m,i]),S?.(i),t("main")},ce=e=>{if(!e||!e.id){console.error("Invalid cloned colleague provided to handleDigitalColleagueClone:",e);return}r(i=>[...i,{...e,type:"digital"}]),S?.({...e,type:"digital"}),t("main")},ue=()=>{C(null),t("form")},X=e=>{if(!e||!e.id){console.error("Invalid colleague provided to handleSaveColleague:",e);return}z?(r(i=>i.map(m=>m.id===e.id?{...e,type:"digital"}:m)),K?.({...e,type:"digital"})):(r(i=>[...i,{...e,type:"digital"}]),S?.({...e,type:"digital"})),t("main"),C(null)},pe=()=>{t("main"),C(null),y(null)},Ce=()=>{t("main"),y(null)},Te=()=>{T&&(C(T),y(null),t("form"))},V=e=>{oe?.(e,p.find(i=>i.id.toString()===e.toString())?.type),r(i=>i.filter(m=>m.id!==e))},fe=()=>{G(""),W("all"),q("all")};return d==="typeSelection"?l(ee,{onSelectHuman:()=>t("userSelection"),onSelectDigital:()=>t("digitalOptions"),onCancel:()=>t("main")}):d==="userSelection"?l(te,{users:de,onUserSelect:ge,onCancel:()=>t("typeSelection")}):d==="digitalOptions"?l(ae,{onCloneExisting:()=>t("digitalClone"),onCreateNew:ue,onCancel:()=>t("typeSelection")}):d==="digitalClone"?l(le,{digitalColleagues:me,onColleagueClone:ce,onCancel:()=>t("digitalOptions")}):d==="form"?l(I,{colleague:z||void 0,onSave:X,onCancel:pe,availableKnowledgeDocuments:j,availableCapabilities:M,availableModels:B}):d==="view"?l(I,{colleague:T||void 0,onSave:X,onCancel:Ce,readOnly:!0,availableKnowledgeDocuments:j,availableCapabilities:M,availableModels:B}):l("div",{className:"px-2 md:px-4 py-4 space-y-8",children:l(Ne,{mode:"wait",children:l(Se.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:a("div",{className:`space-y-6 ${re||""}`,children:[l(Z,{title:"Colleagues",description:"Manage your team members and digital colleagues.",gradient:"bg-gradient-to-r from-green-600 via-emerald-600 to-teal-600",primaryAction:{label:"Add colleague",onClick:R}}),a("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[a(g,{children:[a(h,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[l(b,{className:"text-sm font-medium",children:"Total Colleagues"}),l(ie,{className:"h-4 w-4 text-muted-foreground"})]}),a(c,{children:[l("div",{className:"text-2xl font-bold",children:p.length}),l("p",{className:"text-xs text-muted-foreground",children:"0 active"})]})]}),a(g,{children:[a(h,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[l(b,{className:"text-sm font-medium",children:"Human Members"}),l(we,{className:"h-4 w-4 text-muted-foreground"})]}),a(c,{children:[l("div",{className:"text-2xl font-bold",children:p.filter(e=>e.type==="human").length}),l("p",{className:"text-xs text-muted-foreground",children:"active"})]})]}),a(g,{children:[a(h,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[l(b,{className:"text-sm font-medium",children:"Digital Colleagues"}),l(be,{className:"h-4 w-4 text-muted-foreground"})]}),a(c,{children:[l("div",{className:"text-2xl font-bold",children:p.filter(e=>e.type==="digital").length}),l("p",{className:"text-xs text-muted-foreground",children:"0 active"})]})]})]}),l(g,{children:l(c,{className:"pt-6",children:a("div",{className:"flex flex-col md:flex-row gap-4",children:[l("div",{className:"flex-1",children:a("div",{className:"relative",children:[l(he,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),l(Y,{placeholder:"Search colleagues...",value:s,onChange:e=>G(e.target.value),className:"pl-9"})]})}),a(E,{value:N,onValueChange:W,children:[l($,{className:"w-full md:w-[180px]",children:l(H,{placeholder:"Department"})}),a(F,{children:[l(u,{value:"all",children:"All Departments"}),ne.map(e=>l(u,{value:e,children:e},e))]})]}),a(E,{value:D,onValueChange:q,children:[l($,{className:"w-full md:w-[140px]",children:l(H,{placeholder:"Status"})}),a(F,{children:[l(u,{value:"all",children:"All Status"}),l(u,{value:"active",children:"Active"}),l(u,{value:"inactive",children:"Inactive"})]})]}),(s||N!=="all"||D!=="all")&&a(k,{variant:"outline",onClick:fe,className:"gap-2",children:[l(xe,{className:"h-4 w-4"}),"Clear"]})]})})}),a("div",{className:"space-y-4",children:[l(_,{activeTab:v,onTabChange:se,tabOptions:[{value:"all",label:`All (${f.length})`},{value:"human",label:`Human (${J.length})`},{value:"digital",label:`Digital (${Q.length})`}],maxWidth:"400px",gridCols:3}),v==="all"&&l("div",{className:`grid gap-4 ${n?"grid-cols-1 md:grid-cols-2 lg:grid-cols-4":"grid-cols-1 md:grid-cols-2 lg:grid-cols-3"}`,children:f.map(e=>l(w,{colleague:e,onEdit:A,onDelete:V,onViewDetails:U,compact:n,className:O([e.type==="digital"&&"border-teal-400"])},`${e}-${e.id}`))}),v==="human"&&l("div",{className:`grid gap-4 ${n?"grid-cols-1 md:grid-cols-2 lg:grid-cols-4":"grid-cols-1 md:grid-cols-2 lg:grid-cols-3"}`,children:J.map(e=>l(w,{colleague:e,onEdit:A,onDelete:V,onViewDetails:U,compact:n},e.id))}),v==="digital"&&l("div",{className:`grid gap-4 ${n?"grid-cols-1 md:grid-cols-2 lg:grid-cols-4":"grid-cols-1 md:grid-cols-2 lg:grid-cols-3"}`,children:Q.map(e=>l(w,{colleague:e,onEdit:A,onDelete:V,onViewDetails:U,compact:n,className:O([e.type==="digital"&&"border-teal-400"])},e.id))})]}),f.length===0&&l(g,{children:l(c,{className:"pt-6",children:a("div",{className:"text-center py-8",children:[l(ie,{className:"h-12 w-12 text-muted-foreground mx-auto mb-4"}),l("h3",{className:"text-lg font-semibold mb-2",children:"No colleagues found"}),l("p",{className:"text-muted-foreground mb-4",children:s||N!=="all"||D!=="all"?"Try adjusting your filters to see more results.":"Get started by adding your first colleague."}),a(k,{onClick:R,className:"gap-2",children:[l(ye,{className:"h-4 w-4"}),"Add Colleague"]})]})})})]})},"projects-index-view")})})}export{De as a};
4
+ import{a as O}from"./chunk-GAU24H4A.mjs";import{a as le}from"./chunk-SRXU4X35.mjs";import{a as ae}from"./chunk-PKI57UXP.mjs";import{a as w}from"./chunk-KHJKOKJN.mjs";import{a as I}from"./chunk-YLUMGWDF.mjs";import{a as ee}from"./chunk-JKVQOOCZ.mjs";import{a as te}from"./chunk-R422HRMQ.mjs";import{a as Z}from"./chunk-HF33ZXKX.mjs";import{a as _}from"./chunk-GLZEHRPY.mjs";import{a as E,c as H,d as $,g as F,i as u}from"./chunk-YFAZQYK4.mjs";import{a as g,b as h,c as b,e as c}from"./chunk-YO3GQYRJ.mjs";import{a as Y}from"./chunk-L5JPAKPM.mjs";import{b as k}from"./chunk-ZUA4KNIR.mjs";import{useEffect as ve,useState as o}from"react";import{Plus as ye,Search as he,Users as ie,Bot as be,User as we,Filter as xe}from"lucide-react";import{motion as Se,AnimatePresence as Ne}from"motion/react";import{jsx as l,jsxs as a}from"react/jsx-runtime";function De({initialColleagues:x,onColleagueAdd:S,onColleagueEdit:K,onColleagueDelete:oe,compactView:n=!1,departments:ne=["Design","Engineering","Marketing","Product","Sales","Operations"],className:re,availableUsers:L=[],existingDigitalColleagues:P=[],availableKnowledgeDocuments:j=[],availableCapabilities:M=[],availableModels:B=[]}){let[p,r]=o(x||[]),[s,G]=o(""),[N,W]=o("all"),[D,q]=o("all"),[v,se]=o("all"),[z,C]=o(null),[T,y]=o(null);ve(()=>{r(x||[])},[x]);let de=Array.isArray(L)?L:[],me=Array.isArray(P)?P:[],[d,t]=o("main"),f=p.filter(e=>!e||!e?.name?!1:e?.name.toLowerCase().includes(s.toLowerCase())||e.type==="human"&&e.email?.toLowerCase().includes(s.toLowerCase())||e.type==="digital"&&e.jobDescription?.toLowerCase().includes(s.toLowerCase())),J=f.filter(e=>e.type==="human"),Q=f.filter(e=>e.type==="digital"),R=()=>{t("typeSelection")},A=e=>{e.type==="digital"&&(C(e),t("form")),K?.(e)},U=e=>{e.type==="digital"&&(y(e),t("view"))},ge=e=>{if(!e||!e.id){console.error("Invalid user provided to handleUserSelect:",e);return}let i={id:`human-${Date.now()}`,type:"human",name:e?.name||"Unknown User",email:e?.email||"",updatedAt:e.updatedAt,createdAt:e.createdAt,accounts:e.accounts};r(m=>[...m,i]),S?.(i),t("main")},ce=e=>{if(!e||!e.id){console.error("Invalid cloned colleague provided to handleDigitalColleagueClone:",e);return}r(i=>[...i,{...e,type:"digital"}]),S?.({...e,type:"digital"}),t("main")},ue=()=>{C(null),t("form")},X=e=>{if(!e||!e.id){console.error("Invalid colleague provided to handleSaveColleague:",e);return}z?(r(i=>i.map(m=>m.id===e.id?{...e,type:"digital"}:m)),K?.({...e,type:"digital"})):(r(i=>[...i,{...e,type:"digital"}]),S?.({...e,type:"digital"})),t("main"),C(null)},pe=()=>{t("main"),C(null),y(null)},Ce=()=>{t("main"),y(null)},Te=()=>{T&&(C(T),y(null),t("form"))},V=e=>{oe?.(e,p.find(i=>i.id.toString()===e.toString())?.type),r(i=>i.filter(m=>m.id!==e))},fe=()=>{G(""),W("all"),q("all")};return d==="typeSelection"?l(ee,{onSelectHuman:()=>t("userSelection"),onSelectDigital:()=>t("digitalOptions"),onCancel:()=>t("main")}):d==="userSelection"?l(te,{users:de,onUserSelect:ge,onCancel:()=>t("typeSelection")}):d==="digitalOptions"?l(ae,{onCloneExisting:()=>t("digitalClone"),onCreateNew:ue,onCancel:()=>t("typeSelection")}):d==="digitalClone"?l(le,{digitalColleagues:me,onColleagueClone:ce,onCancel:()=>t("digitalOptions")}):d==="form"?l(I,{colleague:z||void 0,onSave:X,onCancel:pe,availableKnowledgeDocuments:j,availableCapabilities:M,availableModels:B}):d==="view"?l(I,{colleague:T||void 0,onSave:X,onCancel:Ce,readOnly:!0,availableKnowledgeDocuments:j,availableCapabilities:M,availableModels:B}):l("div",{className:"px-2 md:px-4 py-4 space-y-8",children:l(Ne,{mode:"wait",children:l(Se.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:a("div",{className:`space-y-6 ${re||""}`,children:[l(Z,{title:"Colleagues",description:"Manage your team members and digital colleagues.",gradient:"bg-gradient-to-r from-green-600 via-emerald-600 to-teal-600",primaryAction:{label:"Add colleague",onClick:R}}),a("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[a(g,{children:[a(h,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[l(b,{className:"text-sm font-medium",children:"Total Colleagues"}),l(ie,{className:"h-4 w-4 text-muted-foreground"})]}),a(c,{children:[l("div",{className:"text-2xl font-bold",children:p.length}),l("p",{className:"text-xs text-muted-foreground",children:"0 active"})]})]}),a(g,{children:[a(h,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[l(b,{className:"text-sm font-medium",children:"Human Members"}),l(we,{className:"h-4 w-4 text-muted-foreground"})]}),a(c,{children:[l("div",{className:"text-2xl font-bold",children:p.filter(e=>e.type==="human").length}),l("p",{className:"text-xs text-muted-foreground",children:"active"})]})]}),a(g,{children:[a(h,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[l(b,{className:"text-sm font-medium",children:"Digital Colleagues"}),l(be,{className:"h-4 w-4 text-muted-foreground"})]}),a(c,{children:[l("div",{className:"text-2xl font-bold",children:p.filter(e=>e.type==="digital").length}),l("p",{className:"text-xs text-muted-foreground",children:"0 active"})]})]})]}),l(g,{children:l(c,{className:"pt-6",children:a("div",{className:"flex flex-col md:flex-row gap-4",children:[l("div",{className:"flex-1",children:a("div",{className:"relative",children:[l(he,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),l(Y,{placeholder:"Search colleagues...",value:s,onChange:e=>G(e.target.value),className:"pl-9"})]})}),a(E,{value:N,onValueChange:W,children:[l($,{className:"w-full md:w-[180px]",children:l(H,{placeholder:"Department"})}),a(F,{children:[l(u,{value:"all",children:"All Departments"}),ne.map(e=>l(u,{value:e,children:e},e))]})]}),a(E,{value:D,onValueChange:q,children:[l($,{className:"w-full md:w-[140px]",children:l(H,{placeholder:"Status"})}),a(F,{children:[l(u,{value:"all",children:"All Status"}),l(u,{value:"active",children:"Active"}),l(u,{value:"inactive",children:"Inactive"})]})]}),(s||N!=="all"||D!=="all")&&a(k,{variant:"outline",onClick:fe,className:"gap-2",children:[l(xe,{className:"h-4 w-4"}),"Clear"]})]})})}),a("div",{className:"space-y-4",children:[l(_,{activeTab:v,onTabChange:se,tabOptions:[{value:"all",label:`All (${f.length})`},{value:"human",label:`Human (${J.length})`},{value:"digital",label:`Digital (${Q.length})`}],maxWidth:"400px",gridCols:3}),v==="all"&&l("div",{className:`grid gap-4 ${n?"grid-cols-1 md:grid-cols-2 lg:grid-cols-4":"grid-cols-1 md:grid-cols-2 lg:grid-cols-3"}`,children:f.map(e=>l(w,{colleague:e,onEdit:A,onDelete:V,onViewDetails:U,compact:n,className:O([e.type==="digital"&&"border-teal-400"])},`${e}-${e.id}`))}),v==="human"&&l("div",{className:`grid gap-4 ${n?"grid-cols-1 md:grid-cols-2 lg:grid-cols-4":"grid-cols-1 md:grid-cols-2 lg:grid-cols-3"}`,children:J.map(e=>l(w,{colleague:e,onEdit:A,onDelete:V,onViewDetails:U,compact:n},e.id))}),v==="digital"&&l("div",{className:`grid gap-4 ${n?"grid-cols-1 md:grid-cols-2 lg:grid-cols-4":"grid-cols-1 md:grid-cols-2 lg:grid-cols-3"}`,children:Q.map(e=>l(w,{colleague:e,onEdit:A,onDelete:V,onViewDetails:U,compact:n,className:O([e.type==="digital"&&"border-teal-400"])},e.id))})]}),f.length===0&&l(g,{children:l(c,{className:"pt-6",children:a("div",{className:"text-center py-8",children:[l(ie,{className:"h-12 w-12 text-muted-foreground mx-auto mb-4"}),l("h3",{className:"text-lg font-semibold mb-2",children:"No colleagues found"}),l("p",{className:"text-muted-foreground mb-4",children:s||N!=="all"||D!=="all"?"Try adjusting your filters to see more results.":"Get started by adding your first colleague."}),a(k,{onClick:R,className:"gap-2",children:[l(ye,{className:"h-4 w-4"}),"Add Colleague"]})]})})})]})},"projects-index-view")})})}export{De as a};
@@ -1,4 +1,4 @@
1
1
  "use client";
2
2
  "use strict";
3
3
 
4
- import{a}from"./chunk-KOLP657S.mjs";import{a as b}from"./chunk-S3OBSLA5.mjs";import{a as g}from"./chunk-MDJREBVI.mjs";import{useState as l}from"react";import{User as P}from"lucide-react";import{jsx as i,jsxs as h}from"react/jsx-runtime";var v=[{id:"copilot",name:"Peronal Copilot",description:"Your personal AI assistant for all tasks",icon:i(P,{className:"h-4 w-4"}),color:"bg-orange-600",accentColor:"text-orange-600"}];function E({sidebarItems:r,children:U,title:C="Digital Colleagues",notifications:N=[],currentBusinessUnit:B=v[0],onBusinessUnitChange:y,onSearch:c,businessUnits:F=v,activeTab:x,onTabChange:T,showTabs:k=!1,onActionClick:A,actionIcon:R,actionText:S="Action",onNotificationRemove:w,onRemoveAll:M,logo:n="/headerlogo.png",logoLink:d="/teams",appName:o="Nuvia",tagline:s="Collaboration Platform",sidebarInitiallyClosed:O=!1}){let[e,I]=l(!O),[m,t]=l(!1),[u,L]=l(B),p=f=>{L(f),y?.(f)};return h("div",{className:"flex h-full flex-col overflow-hidden rounded-xl bg-background w-[]",children:[m&&i("div",{className:"fixed inset-0 z-40 bg-black/50 md:hidden",onClick:()=>t(!1)}),i("div",{className:"md:hidden",children:i(a,{items:r,isOpen:m,isMobile:!0,onClose:()=>t(!1),currentBusinessUnit:u,onBusinessUnitChange:p,onSearch:c,logo:n,logoLink:d,appName:o,tagline:s})}),i("div",{className:"hidden md:block",children:i(a,{items:r,isOpen:e,isMobile:!1,currentBusinessUnit:u,onBusinessUnitChange:p,onSearch:c,logo:n,logoLink:d,appName:o,tagline:s})}),h("div",{className:g("min-h-screen fixed w-full transition-all duration-300 ease-in-out",e?"md:pl-64":"md:pl-0"),children:[i(b,{title:C,notifications:N,onToggleSidebar:()=>I(!e),onToggleMobileMenu:()=>t(!0),sidebarOpen:e,activeTab:x,onTabChange:T,showTabs:k,onActionClick:A,actionIcon:R,actionText:S,onNotificationRemove:w,onRemoveAll:M,logo:n,appName:o,tagline:s}),i("main",{className:"flex-1 p-0 flex flex-col h-[calc(100vh-4rem)] overflow-y-scroll",children:U})]})]})}export{E as a};
4
+ import{a as b}from"./chunk-RJGEVXIX.mjs";import{a}from"./chunk-RUMNILUG.mjs";import{a as g}from"./chunk-MDJREBVI.mjs";import{useState as l}from"react";import{User as P}from"lucide-react";import{jsx as i,jsxs as h}from"react/jsx-runtime";var v=[{id:"copilot",name:"Peronal Copilot",description:"Your personal AI assistant for all tasks",icon:i(P,{className:"h-4 w-4"}),color:"bg-orange-600",accentColor:"text-orange-600"}];function E({sidebarItems:r,children:U,title:C="Digital Colleagues",notifications:N=[],currentBusinessUnit:B=v[0],onBusinessUnitChange:y,onSearch:c,businessUnits:F=v,activeTab:x,onTabChange:T,showTabs:k=!1,onActionClick:A,actionIcon:R,actionText:S="Action",onNotificationRemove:w,onRemoveAll:M,logo:n="/headerlogo.png",logoLink:d="/teams",appName:o="Nuvia",tagline:s="Collaboration Platform",sidebarInitiallyClosed:O=!1}){let[e,I]=l(!O),[m,t]=l(!1),[u,L]=l(B),p=f=>{L(f),y?.(f)};return h("div",{className:"flex h-full flex-col overflow-hidden rounded-xl bg-background w-[]",children:[m&&i("div",{className:"fixed inset-0 z-40 bg-black/50 md:hidden",onClick:()=>t(!1)}),i("div",{className:"md:hidden",children:i(a,{items:r,isOpen:m,isMobile:!0,onClose:()=>t(!1),currentBusinessUnit:u,onBusinessUnitChange:p,onSearch:c,logo:n,logoLink:d,appName:o,tagline:s})}),i("div",{className:"hidden md:block",children:i(a,{items:r,isOpen:e,isMobile:!1,currentBusinessUnit:u,onBusinessUnitChange:p,onSearch:c,logo:n,logoLink:d,appName:o,tagline:s})}),h("div",{className:g("min-h-screen fixed w-full transition-all duration-300 ease-in-out",e?"md:pl-64":"md:pl-0"),children:[i(b,{title:C,notifications:N,onToggleSidebar:()=>I(!e),onToggleMobileMenu:()=>t(!0),sidebarOpen:e,activeTab:x,onTabChange:T,showTabs:k,onActionClick:A,actionIcon:R,actionText:S,onNotificationRemove:w,onRemoveAll:M,logo:n,appName:o,tagline:s}),i("main",{className:"flex-1 p-0 flex flex-col h-[calc(100vh-4rem)] overflow-y-scroll",children:U})]})]})}export{E as a};
@@ -1,4 +1,4 @@
1
1
  "use client";
2
2
  "use strict";
3
3
 
4
- import{a as N}from"./chunk-2ZBHHV3P.mjs";import{a as n}from"./chunk-3W5SE2HO.mjs";import{a as v}from"./chunk-MQG7MKTK.mjs";import{a as r,b as f,d as y}from"./chunk-DXRAJQMA.mjs";import{a as h}from"./chunk-JMJUFHDA.mjs";import{a}from"./chunk-HF33ZXKX.mjs";import{a as b}from"./chunk-XTUH2DJE.mjs";import{a as g,b as u}from"./chunk-NPVUICIF.mjs";import{useState as x}from"react";import{motion as R,AnimatePresence as L}from"motion/react";import{Bot as E}from"lucide-react";import{jsx as e,jsxs as o}from"react/jsx-runtime";function H({title:C="Digital Colleagues",businessUnits:c,projects:m,fileCount:k,teamMemberCount:A,onCreateProject:w,onOpenProject:P,sidebarItems:M,initialColleagues:V,users:G,onColleagueAdd:Y,onColleagueEdit:z,onColleagueDelete:K}){let[i,s]=x("home"),[l,j]=x(c[0]),d=t=>{console.log("Opening app:",t.name)},p=t=>{console.log("Favoriting app:",t.name)},F=t=>{console.log("Opening file:",t.name)},W=t=>{console.log("Sharing file:",t.name)},S=t=>{console.log("Opening project:",t.name),P(t)},T=t=>{console.log("Sharing project:",t.name)},I=t=>{j(t),console.log("Business unit changed to:",t.name)},U=()=>{console.log("Copilot clicked - navigating to chat"),s("chat")},O=t=>{console.log("Notification removed:",t)},B=()=>{console.log("All notifications removed")},D=()=>{switch(i){case"home":return o("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[o("section",{className:"text-center py-12",children:[o("h1",{className:"text-4xl font-bold mb-4",children:["Welcome to the ",l.name," team"]}),e("p",{className:"text-xl text-muted-foreground mb-8",children:"This is your collaborative workspace for productivity and knowledge sharing."})]}),o("section",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:[o("div",{className:"bg-card p-6 rounded-lg border",children:[e("h3",{className:"text-lg font-semibold mb-2",children:"Projects"}),e("p",{className:"text-3xl font-bold text-primary",children:m.length}),e("p",{className:"text-sm text-muted-foreground",children:"Active projects"})]}),o("div",{className:"bg-card p-6 rounded-lg border",children:[e("h3",{className:"text-lg font-semibold mb-2",children:"Team Members"}),e("p",{className:"text-3xl font-bold text-primary",children:A}),e("p",{className:"text-sm text-muted-foreground",children:"Collaborators"})]}),o("div",{className:"bg-card p-6 rounded-lg border",children:[e("h3",{className:"text-lg font-semibold mb-2",children:"Files"}),e("p",{className:"text-3xl font-bold text-primary",children:k}),e("p",{className:"text-sm text-muted-foreground",children:"Project files"})]})]}),e(a,{title:"Chat with your team",gradient:"bg-gradient-to-r from-pink-600 via-red-600 to-orange-600",primaryAction:{label:"Go",onClick:()=>s("chat")}})]});case"colleagues":return e("div",{children:e("h1",{children:"Colleagues"})});case"chat":return o("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[o("section",{className:"text-center py-12",children:[e("h1",{className:"text-4xl font-bold mb-4",children:"Team Chat"}),o("p",{className:"text-xl text-muted-foreground mb-8",children:["Connect with your ",l.name," team members and collaborate in real-time."]})]}),e(a,{title:"Launch Full Chat Interface",description:"Access the complete chat experience with AI assistance.",gradient:"bg-gradient-to-r from-blue-600 via-purple-600 to-pink-600",primaryAction:{label:"Open Chat",onClick:()=>console.log("Open full chat interface")}})]});case"apps":return o("div",{className:"space-y-8",children:[e(a,{title:"Creative Apps Collection",description:"Discover our full suite of professional design and creative applications.",gradient:"bg-gradient-to-r from-pink-600 via-red-600 to-orange-600",primaryAction:{label:"Install Desktop App",onClick:()=>console.log("Install desktop app clicked")}}),o("section",{className:"space-y-4",children:[e("h2",{className:"text-2xl font-semibold",children:"New Releases"}),e("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4",children:r.filter(t=>t.new).map(t=>e(n,{app:t,showProgress:!0,onOpen:d,onFavorite:p},t.name))})]}),o("section",{className:"space-y-4",children:[e("h2",{className:"text-2xl font-semibold",children:"All Apps"}),e("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4",children:r.map(t=>e(n,{app:t,onOpen:d,onFavorite:p},t.name))})]})]});case"knowledge":return e(N,{});case"files":return o("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[e(a,{title:"Your Creative Files",description:"Access, manage, and share all your design files in one place.",gradient:"bg-gradient-to-r from-teal-600 via-cyan-600 to-blue-600",primaryAction:{label:"Upload Files",onClick:()=>console.log("Upload files clicked")}}),o("section",{className:"space-y-4",children:[e("div",{className:"flex items-center justify-between",children:e("h2",{className:"text-2xl font-semibold",children:"All Files"})}),e(h,{files:f,onFileClick:F})]})]});case"projects":return o("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[e(a,{title:"Project Management",description:"Organize your creative work into projects and collaborate with your team.",gradient:"bg-gradient-to-r from-purple-600 via-violet-600 to-indigo-600",primaryAction:{label:"New Project",onClick:w}}),o("section",{className:"space-y-4",children:[e("h2",{className:"text-2xl font-semibold",children:"Active Projects"}),e("div",{className:"grid grid-cols-1 gap-3 md:grid-cols-2 lg:grid-cols-3",children:m.map(t=>e(v,{project:t,onOpen:S,onShare:T},t.name))})]})]});case"learn":return o("div",{className:"space-y-8",children:[e(a,{title:"Learn & Grow",description:"Expand your creative skills with tutorials, courses, and resources.",gradient:"bg-gradient-to-r from-green-600 via-emerald-600 to-teal-600",primaryAction:{label:"Upgrade to Pro",onClick:()=>console.log("Upgrade to pro clicked")}}),o("section",{className:"space-y-4",children:[e("h2",{className:"text-2xl font-semibold",children:"Featured Tutorials"}),e("div",{className:"grid grid-cols-1 gap-6 md:grid-cols-2 lg:grid-cols-3",children:y.slice(0,3).map(t=>o("div",{className:"rounded-3xl border p-6",children:[e("h3",{className:"font-semibold mb-2",children:t.title}),e("p",{className:"text-sm text-muted-foreground mb-4",children:t.description}),o("div",{className:"flex items-center justify-between text-sm",children:[e("span",{children:t.duration}),e("span",{children:t.level})]})]},t.title))})]})]});default:return null}};return e(b,{sidebarItems:g,title:C,notifications:u,businessUnits:c,currentBusinessUnit:l,onBusinessUnitChange:I,activeTab:i,onTabChange:s,showTabs:!0,onActionClick:U,actionIcon:e(E,{className:"mr-2 h-4 w-4"}),actionText:"Start Chat",onNotificationRemove:O,onRemoveAll:B,children:e(L,{mode:"wait",children:e(R.div,{className:"flex-1 h-full",initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:D()},i)})})}export{H as a};
4
+ import{a as N}from"./chunk-2ZBHHV3P.mjs";import{a as n}from"./chunk-3W5SE2HO.mjs";import{a as r,b as f,d as y}from"./chunk-DXRAJQMA.mjs";import{a as v}from"./chunk-MQG7MKTK.mjs";import{a as h}from"./chunk-PTRLJGWG.mjs";import{a}from"./chunk-HF33ZXKX.mjs";import{a as b}from"./chunk-HQSF6B4Y.mjs";import{a as g,b as u}from"./chunk-NPVUICIF.mjs";import{useState as x}from"react";import{motion as R,AnimatePresence as L}from"motion/react";import{Bot as E}from"lucide-react";import{jsx as e,jsxs as o}from"react/jsx-runtime";function H({title:C="Digital Colleagues",businessUnits:c,projects:m,fileCount:k,teamMemberCount:A,onCreateProject:w,onOpenProject:P,sidebarItems:M,initialColleagues:V,users:G,onColleagueAdd:Y,onColleagueEdit:z,onColleagueDelete:K}){let[i,s]=x("home"),[l,j]=x(c[0]),d=t=>{console.log("Opening app:",t.name)},p=t=>{console.log("Favoriting app:",t.name)},F=t=>{console.log("Opening file:",t.name)},W=t=>{console.log("Sharing file:",t.name)},S=t=>{console.log("Opening project:",t.name),P(t)},T=t=>{console.log("Sharing project:",t.name)},I=t=>{j(t),console.log("Business unit changed to:",t.name)},U=()=>{console.log("Copilot clicked - navigating to chat"),s("chat")},O=t=>{console.log("Notification removed:",t)},B=()=>{console.log("All notifications removed")},D=()=>{switch(i){case"home":return o("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[o("section",{className:"text-center py-12",children:[o("h1",{className:"text-4xl font-bold mb-4",children:["Welcome to the ",l.name," team"]}),e("p",{className:"text-xl text-muted-foreground mb-8",children:"This is your collaborative workspace for productivity and knowledge sharing."})]}),o("section",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:[o("div",{className:"bg-card p-6 rounded-lg border",children:[e("h3",{className:"text-lg font-semibold mb-2",children:"Projects"}),e("p",{className:"text-3xl font-bold text-primary",children:m.length}),e("p",{className:"text-sm text-muted-foreground",children:"Active projects"})]}),o("div",{className:"bg-card p-6 rounded-lg border",children:[e("h3",{className:"text-lg font-semibold mb-2",children:"Team Members"}),e("p",{className:"text-3xl font-bold text-primary",children:A}),e("p",{className:"text-sm text-muted-foreground",children:"Collaborators"})]}),o("div",{className:"bg-card p-6 rounded-lg border",children:[e("h3",{className:"text-lg font-semibold mb-2",children:"Files"}),e("p",{className:"text-3xl font-bold text-primary",children:k}),e("p",{className:"text-sm text-muted-foreground",children:"Project files"})]})]}),e(a,{title:"Chat with your team",gradient:"bg-gradient-to-r from-pink-600 via-red-600 to-orange-600",primaryAction:{label:"Go",onClick:()=>s("chat")}})]});case"colleagues":return e("div",{children:e("h1",{children:"Colleagues"})});case"chat":return o("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[o("section",{className:"text-center py-12",children:[e("h1",{className:"text-4xl font-bold mb-4",children:"Team Chat"}),o("p",{className:"text-xl text-muted-foreground mb-8",children:["Connect with your ",l.name," team members and collaborate in real-time."]})]}),e(a,{title:"Launch Full Chat Interface",description:"Access the complete chat experience with AI assistance.",gradient:"bg-gradient-to-r from-blue-600 via-purple-600 to-pink-600",primaryAction:{label:"Open Chat",onClick:()=>console.log("Open full chat interface")}})]});case"apps":return o("div",{className:"space-y-8",children:[e(a,{title:"Creative Apps Collection",description:"Discover our full suite of professional design and creative applications.",gradient:"bg-gradient-to-r from-pink-600 via-red-600 to-orange-600",primaryAction:{label:"Install Desktop App",onClick:()=>console.log("Install desktop app clicked")}}),o("section",{className:"space-y-4",children:[e("h2",{className:"text-2xl font-semibold",children:"New Releases"}),e("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4",children:r.filter(t=>t.new).map(t=>e(n,{app:t,showProgress:!0,onOpen:d,onFavorite:p},t.name))})]}),o("section",{className:"space-y-4",children:[e("h2",{className:"text-2xl font-semibold",children:"All Apps"}),e("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4",children:r.map(t=>e(n,{app:t,onOpen:d,onFavorite:p},t.name))})]})]});case"knowledge":return e(N,{});case"files":return o("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[e(a,{title:"Your Creative Files",description:"Access, manage, and share all your design files in one place.",gradient:"bg-gradient-to-r from-teal-600 via-cyan-600 to-blue-600",primaryAction:{label:"Upload Files",onClick:()=>console.log("Upload files clicked")}}),o("section",{className:"space-y-4",children:[e("div",{className:"flex items-center justify-between",children:e("h2",{className:"text-2xl font-semibold",children:"All Files"})}),e(h,{files:f,onFileClick:F})]})]});case"projects":return o("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[e(a,{title:"Project Management",description:"Organize your creative work into projects and collaborate with your team.",gradient:"bg-gradient-to-r from-purple-600 via-violet-600 to-indigo-600",primaryAction:{label:"New Project",onClick:w}}),o("section",{className:"space-y-4",children:[e("h2",{className:"text-2xl font-semibold",children:"Active Projects"}),e("div",{className:"grid grid-cols-1 gap-3 md:grid-cols-2 lg:grid-cols-3",children:m.map(t=>e(v,{project:t,onOpen:S,onShare:T},t.name))})]})]});case"learn":return o("div",{className:"space-y-8",children:[e(a,{title:"Learn & Grow",description:"Expand your creative skills with tutorials, courses, and resources.",gradient:"bg-gradient-to-r from-green-600 via-emerald-600 to-teal-600",primaryAction:{label:"Upgrade to Pro",onClick:()=>console.log("Upgrade to pro clicked")}}),o("section",{className:"space-y-4",children:[e("h2",{className:"text-2xl font-semibold",children:"Featured Tutorials"}),e("div",{className:"grid grid-cols-1 gap-6 md:grid-cols-2 lg:grid-cols-3",children:y.slice(0,3).map(t=>o("div",{className:"rounded-3xl border p-6",children:[e("h3",{className:"font-semibold mb-2",children:t.title}),e("p",{className:"text-sm text-muted-foreground mb-4",children:t.description}),o("div",{className:"flex items-center justify-between text-sm",children:[e("span",{children:t.duration}),e("span",{children:t.level})]})]},t.title))})]})]});default:return null}};return e(b,{sidebarItems:g,title:C,notifications:u,businessUnits:c,currentBusinessUnit:l,onBusinessUnitChange:I,activeTab:i,onTabChange:s,showTabs:!0,onActionClick:U,actionIcon:e(E,{className:"mr-2 h-4 w-4"}),actionText:"Start Chat",onNotificationRemove:O,onRemoveAll:B,children:e(L,{mode:"wait",children:e(R.div,{className:"flex-1 h-full",initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:D()},i)})})}export{H as a};
@@ -1,4 +1,4 @@
1
1
  "use client";
2
2
  "use strict";
3
3
 
4
- import{a as x}from"./chunk-WLI2YTOQ.mjs";import{a as w}from"./chunk-I6XKBCH4.mjs";import{a as f}from"./chunk-ZPJJOZY4.mjs";import{a as c,b as p,i as u,j as m}from"./chunk-OCPX4QPC.mjs";import{b as g}from"./chunk-ZUA4KNIR.mjs";import{useEffect as S,useState as l}from"react";import{ChevronDown as j,Loader2 as P}from"lucide-react";import{Fragment as B,jsx as e,jsxs as t}from"react/jsx-runtime";function U({documents:v=[],contexts:o=[],onDocumentClick:C=n=>console.log("Document clicked:",n),onDocumentShare:D=n=>console.log("Share document:",n),onLoadDocumentContent:L,selectedDocumentId:K,onAddKnowledge:s,onDocumentUpdate:b,onAddTeamContext:h,onUpdateTeamContext:N,onDeleteTeamContext:y}){let[n,i]=l(o[0]),[M,r]=l(!1),[A,a]=l(!1),[k,I]=l(!1);S(()=>{if(!n&&o&&o.length>0)i(o[0]);else{let d=o.find(O=>O.id===n?.id);i(d||o[0])}},[o]);let T=d=>{s&&(I(!0),s(d)),r(!1)};return t("div",{className:"flex flex-col h-full",children:[t("div",{className:"px-2 md:px-4 py-4 flex-shrink-0",children:[k&&t("div",{className:"absolute inset-0 bg-background/90 z-[9999] flex flex-col items-center justify-center gap-4",children:[e(P,{className:"h-8 w-8 animate-spin text-primary"}),e("p",{className:"font-semibold text-lg",children:"Initializing document..."})]}),o&&o.length>0&&t("div",{className:"",children:[e("div",{className:"",children:t("nav",{className:"-mb-px flex justify-between items-center",children:[e("div",{className:"flex space-x-8 overflow-x-auto",children:o.map(d=>t("button",{onClick:()=>i(d),className:`group inline-flex items-center gap-2 py-3 px-1 border-b-2 font-medium text-sm whitespace-nowrap transition-colors ${n?.id===d.id?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground hover:border-muted-foreground"}`,children:[d.icon,d.label]},d.id))}),t(c,{children:[e(p,{children:t("div",{className:"inline-flex border border-primary rounded-xl items-center justify-center gap-2 py-2 px-3 text-sm font-medium text-primary hover:text-primary/80 transition-colors whitespace-nowrap",children:["Actions ",e(j,{className:"h-4 w-4"})]})}),t(u,{children:[e(m,{onClick:()=>r(!0),children:"Add Knowledge"}),e(m,{onClick:()=>a(!0),children:"Manage Contexts"})]})]})]})}),n?.description&&e("div",{className:"mt-3 px-1",children:e("p",{className:"text-sm text-primary",children:n?.description})})]})]}),n?e("div",{className:"flex-1 min-h-0 px-2 md:px-4 pb-4",children:e("div",{className:"h-full rounded-xl border overflow-hidden",children:e(f,{documents:v,menuConfig:n?.menuConfig,onDocumentClick:C,onDocumentShare:D,selectedDocumentId:K,onDocumentUpdate:b})})}):t("div",{children:[e("div",{className:"flex-1 min-h-0 px-2 md:px-4 pb-4 flex items-center justify-center",children:e("p",{className:"text-muted-foreground",children:"No contexts available"})}),e("div",{className:"flex-1 min-h-0 px-2 md:px-4 pb-4 flex items-center justify-center",children:e(g,{onClick:()=>a(!0),children:"Add Context"})})]}),t(B,{children:[e(x,{isOpen:A,onClose:()=>a(!1),knowledgeSources:o,onCreate:h,onUpdate:N,onDelete:y}),e(w,{isOpen:M,onClose:()=>r(!1),onAddKnowledge:T,knowledgeContexts:o})]})]})}export{U as a};
4
+ import{a as x}from"./chunk-RWVEYOUL.mjs";import{a as w}from"./chunk-I6XKBCH4.mjs";import{a as f}from"./chunk-LV23ARQV.mjs";import{a as c,b as p,i as u,j as m}from"./chunk-OCPX4QPC.mjs";import{b as g}from"./chunk-ZUA4KNIR.mjs";import{useEffect as S,useState as l}from"react";import{ChevronDown as j,Loader2 as P}from"lucide-react";import{Fragment as B,jsx as e,jsxs as t}from"react/jsx-runtime";function U({documents:v=[],contexts:o=[],onDocumentClick:C=n=>console.log("Document clicked:",n),onDocumentShare:D=n=>console.log("Share document:",n),onLoadDocumentContent:L,selectedDocumentId:K,onAddKnowledge:s,onDocumentUpdate:b,onAddTeamContext:h,onUpdateTeamContext:N,onDeleteTeamContext:y}){let[n,i]=l(o[0]),[M,r]=l(!1),[A,a]=l(!1),[k,I]=l(!1);S(()=>{if(!n&&o&&o.length>0)i(o[0]);else{let d=o.find(O=>O.id===n?.id);i(d||o[0])}},[o]);let T=d=>{s&&(I(!0),s(d)),r(!1)};return t("div",{className:"flex flex-col h-full",children:[t("div",{className:"px-2 md:px-4 py-4 flex-shrink-0",children:[k&&t("div",{className:"absolute inset-0 bg-background/90 z-[9999] flex flex-col items-center justify-center gap-4",children:[e(P,{className:"h-8 w-8 animate-spin text-primary"}),e("p",{className:"font-semibold text-lg",children:"Initializing document..."})]}),o&&o.length>0&&t("div",{className:"",children:[e("div",{className:"",children:t("nav",{className:"-mb-px flex justify-between items-center",children:[e("div",{className:"flex space-x-8 overflow-x-auto",children:o.map(d=>t("button",{onClick:()=>i(d),className:`group inline-flex items-center gap-2 py-3 px-1 border-b-2 font-medium text-sm whitespace-nowrap transition-colors ${n?.id===d.id?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground hover:border-muted-foreground"}`,children:[d.icon,d.label]},d.id))}),t(c,{children:[e(p,{children:t("div",{className:"inline-flex border border-primary rounded-xl items-center justify-center gap-2 py-2 px-3 text-sm font-medium text-primary hover:text-primary/80 transition-colors whitespace-nowrap",children:["Actions ",e(j,{className:"h-4 w-4"})]})}),t(u,{children:[e(m,{onClick:()=>r(!0),children:"Add Knowledge"}),e(m,{onClick:()=>a(!0),children:"Manage Contexts"})]})]})]})}),n?.description&&e("div",{className:"mt-3 px-1",children:e("p",{className:"text-sm text-primary",children:n?.description})})]})]}),n?e("div",{className:"flex-1 min-h-0 px-2 md:px-4 pb-4",children:e("div",{className:"h-full rounded-xl border overflow-hidden",children:e(f,{documents:v,menuConfig:n?.menuConfig,onDocumentClick:C,onDocumentShare:D,selectedDocumentId:K,onDocumentUpdate:b})})}):t("div",{children:[e("div",{className:"flex-1 min-h-0 px-2 md:px-4 pb-4 flex items-center justify-center",children:e("p",{className:"text-muted-foreground",children:"No contexts available"})}),e("div",{className:"flex-1 min-h-0 px-2 md:px-4 pb-4 flex items-center justify-center",children:e(g,{onClick:()=>a(!0),children:"Add Context"})})]}),t(B,{children:[e(x,{isOpen:A,onClose:()=>a(!1),knowledgeSources:o,onCreate:h,onUpdate:N,onDelete:y}),e(w,{isOpen:M,onClose:()=>r(!1),onAddKnowledge:T,knowledgeContexts:o})]})]})}export{U as a};
@@ -1 +1 @@
1
- import{a as p}from"./chunk-T5HJS6OF.mjs";import{a}from"./chunk-MDJREBVI.mjs";import{jsx as o}from"react/jsx-runtime";var c=r=>{let{posts:t}=r;return o("div",{className:a("container"),children:o("div",{children:o("div",{className:"grid grid-cols-4 sm:grid-cols-8 lg:grid-cols-12 gap-y-4 gap-x-4 lg:gap-y-8 lg:gap-x-8 xl:gap-x-8",children:t?.map((s,i)=>typeof s=="object"&&s!==null?o("div",{className:"col-span-4",children:o(p,{className:"h-full",doc:s,relationTo:"posts",showCategories:!0})},i):null)})})})};export{c as a};
1
+ import{a as p}from"./chunk-RSDUFAIB.mjs";import{a}from"./chunk-MDJREBVI.mjs";import{jsx as o}from"react/jsx-runtime";var c=r=>{let{posts:t}=r;return o("div",{className:a("container"),children:o("div",{children:o("div",{className:"grid grid-cols-4 sm:grid-cols-8 lg:grid-cols-12 gap-y-4 gap-x-4 lg:gap-y-8 lg:gap-x-8 xl:gap-x-8",children:t?.map((s,i)=>typeof s=="object"&&s!==null?o("div",{className:"col-span-4",children:o(p,{className:"h-full",doc:s,relationTo:"posts",showCategories:!0})},i):null)})})})};export{c as a};