System.register(["./index-legacy-DF2p3puw.js","./default-profile-pic-legacy-BJtkId8u.js","./InfoBox-legacy-DU3ZgUVm.js"],(function(e,a){"use strict";var t,l,r,n;return{setters:[function(e){t=e.t,l=e.j},function(e){r=e.d},function(e){n=e.I}],execute:function(){e("default",(function(){var e,a,s,o,i,d=t.auth.verifySession.useQuery().data,u=d?t.organization.getOrganizationsForUser.useQuery({userEmail:d.email}):null,c=localStorage.getItem("currentOrganization"),m=c?JSON.parse(c).value:null!=u&&u.data&&(null==u||null===(e=u.data)||void 0===e?void 0:e.length)<0?null==u?void 0:u.data[0]._id.toString():null,x=m?t.organization.getCurrentOrganizationDetails.useQuery({orgId:m}):null;return null==u||!u.data||null!=u&&u.data&&(null==u||null===(a=u.data)||void 0===a?void 0:a.length)<1?l.jsxs(l.Fragment,{children:[l.jsx("h3",{className:"text-gray-900 text-2xl font-semibold",children:"Collaborators"}),l.jsx("hr",{className:"my-2"}),l.jsx(n,{className:"mt-4 bg-purple-100",infoIconColorClass:"text-purple-900",children:l.jsx("p",{children:'You are not part of any organization. Please contact your organization owner to add you to an organization. If you are the owner, please create an organization by by clicking on the "Add new organization" button at the top right corner.'})})]}):l.jsxs("div",{className:"flex flex-col",children:[l.jsxs("h3",{className:"text-gray-900 text-2xl font-semibold",children:["Collaborators for ",null==x||null===(s=x.data)||void 0===s?void 0:s.name]}),l.jsx("hr",{className:"my-2"}),l.jsx("p",{className:"mb-4",children:"Lorem ipsum dolor sit amet, consectetur adipisicing elit. Vel obcaecati repudiandae illum quidem doloremque. Porro voluptas asperiores, tempora eos voluptatibus eveniet corrupti. Distinctio aliquam eligendi consequatur? Harum iste quam dolorem."}),l.jsx("h3",{className:"font-bold text-gray-900",children:"Owner"}),l.jsx("hr",{className:"my-2"}),l.jsxs("h3",{className:"font-bold text-purple-900 mb-4 flex items-center",children:[l.jsx("img",{className:"h-10 w-10 rounded-full",src:r,alt:"User Avatar"}),l.jsx("span",{className:"ml-4",children:null==x||null===(o=x.data)||void 0===o?void 0:o.createdBy.email})]}),l.jsxs("div",{className:"flex items-center justify-between",children:[l.jsx("h3",{className:"font-bold text-gray-900",children:"All"}),l.jsx("button",{className:"bg-purple-950 rounded-md px-4 py-1 text-white font-medium cursor-pointer",children:"Add User"})]}),l.jsx("hr",{className:"my-2"}),l.jsx("div",{className:"flex flex-col",children:null==x||null===(i=x.data)||void 0===i?void 0:i.users.map((function(e){return l.jsxs("div",{className:"cursor-pointer flex flex-row item-center justify-between p-2 border rounded border-gray-400 hover:border-purple-950",children:[l.jsxs("div",{className:"flex items-center justify-center",children:[l.jsx("img",{className:"h-10 w-10 rounded-full",src:r,alt:"User Avatar"}),l.jsx("p",{className:"font-normal text-gray-900 px-4",children:e.email})]}),l.jsx("button",{className:" rounded-md px-4 py-1 text-red-600 font-normal cursor-pointer",children:"Remove"})]},e.id.toString())}))})]})}))}}}));
