text: "use strict";(self.webpackChunk=self.webpackChunk||[]).push([[968,824,178,699],{1326:(e,t,o)=>{o.d(t,{Z:()=>a});var n=o(3645),r=o.n(n)()((function(e){return e[1]}));r.push([e.id,".duration-200{transition-duration:.2s}.model{-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);background:hsla(0,0%,100%,.25);height:100vh;overflow-y:auto;position:fixed;top:0;width:100%;z-index:500}",""]);const a=r},8789:(e,t,o)=>{o.d(t,{Z:()=>l});var n=o(821),r={class:"text-sm text-gray-600"};const a=(0,n.defineComponent)({props:["on"]});const l=(0,o(3744).Z)(a,[["render",function(e,t,o,a,l,s){return(0,n.openBlock)(),(0,n.createElementBlock)("div",null,[(0,n.createVNode)(n.Transition,{"leave-active-class":"transition ease-in duration-1000","leave-from-class":"opacity-100","leave-to-class":"opacity-0"},{default:(0,n.withCtx)((function(){return[(0,n.withDirectives)((0,n.createElementVNode)("div",r,[(0,n.renderSlot)(e.$slots,"default")],512),[[n.vShow,e.on]])]})),_:3})])}]])},8050:(e,t,o)=>{o.d(t,{Z:()=>c});var n=o(821),r={class:"md:grid md:grid-cols-3 md:gap-6"},a={class:"mt-5 md:mt-0 md:col-span-2"},l={class:"px-4 py-5 sm:p-6 bg-white shadow sm:rounded-lg"};var s=o(5218);const i=(0,n.defineComponent)({components:{JetSectionTitle:s.Z}});const c=(0,o(3744).Z)(i,[["render",function(e,t,o,s,i,c){var m=(0,n.resolveComponent)("jet-section-title");return(0,n.openBlock)(),(0,n.createElementBlock)("div",r,[(0,n.createVNode)(m,null,{title:(0,n.withCtx)((function(){return[(0,n.renderSlot)(e.$slots,"title")]})),description:(0,n.withCtx)((function(){return[(0,n.renderSlot)(e.$slots,"description")]})),_:3}),(0,n.createElementVNode)("div",a,[(0,n.createElementVNode)("div",l,[(0,n.renderSlot)(e.$slots,"content")])])])}]])},7020:(e,t,o)=>{o.d(t,{Z:()=>l});var n=o(821),r=["type"];const a=(0,n.defineComponent)({props:{type:{type:String,default:"submit"}}});const l=(0,o(3744).Z)(a,[["render",function(e,t,o,a,l,s){return(0,n.openBlock)(),(0,n.createElementBlock)("button",{type:e.type,class:"inline-flex items-center px-4 py-2 bg-gray-800 border border-transparent rounded-md font-semibold text-xs text-white uppercase tracking-widest hover:bg-gray-700 active:bg-gray-900 focus:outline-none focus:border-gray-900 focus:ring focus:ring-gray-300 disabled:opacity-25 transition"},[(0,n.renderSlot)(e.$slots,"default")],8,r)}]])},8651:(e,t,o)=>{o.d(t,{Z:()=>p});var n=o(821),r={class:"bg-white px-4 pt-5 pb-4 sm:p-6 sm:pb-4"},a={class:"sm:flex sm:items-start"},l=(0,n.createElementVNode)("div",{class:"mx-auto shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-red-100 sm:mx-0 sm:h-10 sm:w-10"},[(0,n.createElementVNode)("svg",{class:"h-6 w-6 text-red-600",stroke:"currentColor",fill:"none",viewBox:"0 0 24 24"},[(0,n.createElementVNode)("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})])],-1),s={class:"mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left"},i={class:"text-lg"},c={class:"mt-2"},m={class:"flex flex-row justify-end px-6 py-4 bg-gray-100 text-right"};var d=o(8286);const u=(0,n.defineComponent)({emits:["close"],components:{Modal:d.Z},props:{show:{default:!1},maxWidth:{default:"2xl"},closeable:{default:!0}},methods:{close:function(){this.$emit("close")}}});const p=(0,o(3744).Z)(u,[["render",function(e,t,o,d,u,p){var f=(0,n.resolveComponent)("modal");return(0,n.openBlock)(),(0,n.createBlock)(f,{show:e.show,"max-width":e.maxWidth,closeable:e.closeable,onClose:e.close},{default:(0,n.withCtx)((function(){return[(0,n.createElementVNode)("div",r,[(0,n.createElementVNode)("div",a,[l,(0,n.createElementVNode)("div",s,[(0,n.createElementVNode)("h3",i,[(0,n.renderSlot)(e.$slots,"title")]),(0,n.createElementVNode)("div",c,[(0,n.renderSlot)(e.$slots,"content")])])])]),(0,n.createElementVNode)("div",m,[(0,n.renderSlot)(e.$slots,"footer")])]})),_:3},8,["show","max-width","closeable","onClose"])}]])},3309:(e,t,o)=>{o.d(t,{Z:()=>l});var n=o(821),r=["type"];const a=(0,n.defineComponent)({props:{type:{type:String,default:"button"}}});const l=(0,o(3744).Z)(a,[["render",function(e,t,o,a,l,s){return(0,n.openBlock)(),(0,n.createElementBlock)("button",{type:e.type,class:"inline-flex items-center justify-center px-4 py-2 bg-red-600 border border-transparent rounded-md font-semibold text-xs text-white uppercase tracking-widest hover:bg-red-500 focus:outline-none focus:border-red-700 focus:ring focus:ring-red-200 active:bg-red-600 disabled:opacity-25 transition"},[(0,n.renderSlot)(e.$slots,"default")],8,r)}]])},7637:(e,t,o)=>{o.d(t,{Z:()=>m});var n=o(821),r={class:"px-6 py-4"},a={class:"text-lg"},l={class:"mt-4"},s={class:"flex flex-row justify-end px-6 py-4 bg-gray-100 text-right"};var i=o(8286);const c=(0,n.defineComponent)({emits:["close"],components:{Modal:i.Z},props:{show:{default:!1},maxWidth:{default:"2xl"},closeable:{default:!0}},methods:{close:function(){this.$emit("close")}}});const m=(0,o(3744).Z)(c,[["render",function(e,t,o,i,c,m){var d=(0,n.resolveComponent)("modal");return(0,n.openBlock)(),(0,n.createBlock)(d,{show:e.show,"max-width":e.maxWidth,closeable:e.closeable,onClose:e.close},{default:(0,n.withCtx)((function(){return[(0,n.createElementVNode)("div",r,[(0,n.createElementVNode)("div",a,[(0,n.renderSlot)(e.$slots,"title")]),(0,n.createElementVNode)("div",l,[(0,n.renderSlot)(e.$slots,"content")])]),(0,n.createElementVNode)("div",s,[(0,n.renderSlot)(e.$slots,"footer")])]})),_:3},8,["show","max-width","closeable","onClose"])}]])},9153:(e,t,o)=>{o.d(t,{Z:()=>m});var n=o(821),r={class:"md:grid md:grid-cols-3 md:gap-6"},a={class:"mt-5 md:mt-0 md:col-span-2"},l={class:"grid grid-cols-6 gap-6"},s={key:0,class:"flex items-center justify-end px-4 py-3 bg-gray-50 text-right sm:px-6 shadow sm:rounded-bl-md sm:rounded-br-md"};var i=o(5218);const c=(0,n.defineComponent)({emits:["submitted"],components:{JetSectionTitle:i.Z},computed:{hasActions:function(){return!!this.$slots.actions}}});const m=(0,o(3744).Z)(c,[["render",function(e,t,o,i,c,m){var d=(0,n.resolveComponent)("jet-section-title");return(0,n.openBlock)(),(0,n.createElementBlock)("div",r,[(0,n.createVNode)(d,null,{title:(0,n.withCtx)((function(){return[(0,n.renderSlot)(e.$slots,"title")]})),description:(0,n.withCtx)((function(){return[(0,n.renderSlot)(e.$slots,"description")]})),_:3}),(0,n.createElementVNode)("div",a,[(0,n.createElementVNode)("form",{onSubmit:t[0]||(t[0]=(0,n.withModifiers)((function(t){return e.$emit("submitted")}),["prevent"]))},[(0,n.createElementVNode)("div",{class:(0,n.normalizeClass)(["px-4 py-5 bg-white sm:p-6 shadow",e.hasActions?"sm:rounded-tl-md sm:rounded-tr-md":"sm:rounded-md"])},[(0,n.createElementVNode)("div",l,[(0,n.renderSlot)(e.$slots,"form")])],2),e.hasActions?((0,n.openBlock)(),(0,n.createElementBlock)("div",s,[(0,n.renderSlot)(e.$slots,"actions")])):(0,n.createCommentVNode)("",!0)],32)])])}]])},7292:(e,t,o)=>{o.d(t,{Z:()=>l});var n=o(821),r=["value"];const a=(0,n.defineComponent)({props:["modelValue"],emits:["update:modelValue"],methods:{focus:function(){this.$refs.input.focus()}}});const l=(0,o(3744).Z)(a,[["render",function(e,t,o,a,l,s){return(0,n.openBlock)(),(0,n.createElementBlock)("input",{class:"border-gray-300 focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50 rounded-md shadow-sm",value:e.modelValue,onInput:t[0]||(t[0]=function(t){return e.$emit("update:modelValue",t.target.value)}),ref:"input"},null,40,r)}]])},675:(e,t,o)=>{o.d(t,{Z:()=>l});var n=o(821),r={class:"text-sm text-red-600"};const a=(0,n.defineComponent)({props:["message"]});const l=(0,o(3744).Z)(a,[["render",function(e,t,o,a,l,s){return(0,n.withDirectives)(((0,n.openBlock)(),(0,n.createElementBlock)("div",null,[(0,n.createElementVNode)("p",r,(0,n.toDisplayString)(e.message),1)],512)),[[n.vShow,e.message]])}]])},6138:(e,t,o)=>{o.d(t,{Z:()=>i});var n=o(821),r={class:"block font-medium text-sm text-gray-700"},a={key:0},l={key:1};const s=(0,n.defineComponent)({props:["value"]});const i=(0,o(3744).Z)(s,[["render",function(e,t,o,s,i,c){return(0,n.openBlock)(),(0,n.createElementBlock)("label",r,[e.value?((0,n.openBlock)(),(0,n.createElementBlock)("span",a,(0,n.toDisplayString)(e.value),1)):((0,n.openBlock)(),(0,n.createElementBlock)("span",l,[(0,n.renderSlot)(e.$slots,"default")]))])}]])},8286:(e,t,o)=>{o.d(t,{Z:()=>d});var n=o(821),r={class:"model","scroll-region":""},a=[(0,n.createElementVNode)("div",{class:"absolute inset-0 bg-gray-500 opacity-75"},"where are you",-1)];const l=(0,n.defineComponent)({emits:["close"],props:{show:{default:!1},maxWidth:{default:"2xl"},closeable:{default:!0}},watch:{show:{immediate:!0,handler:function(e){document.body.style.overflow=e?"hidden":null}}},setup:function(e,t){var o=t.emit,r=function(){e.closeable&&o("close")},a=function(t){"Escape"===t.key&&e.show&&r()};return(0,n.onMounted)((function(){return document.addEventListener("keydown",a)})),(0,n.onUnmounted)((function(){document.removeEventListener("keydown",a),document.body.style.overflow=null})),{close:r}},computed:{maxWidthClass:function(){return{sm:"sm:max-w-sm",md:"sm:max-w-md",lg:"sm:max-w-lg",xl:"sm:max-w-xl","2xl":"sm:max-w-2xl"}[this.maxWidth]}}});var s=o(3379),i=o.n(s),c=o(1326),m={insert:"head",singleton:!1};i()(c.Z,m);c.Z.locals;const d=(0,o(3744).Z)(l,[["render",function(e,t,o,l,s,i){return(0,n.openBlock)(),(0,n.createBlock)(n.Teleport,{to:"body"},[(0,n.createVNode)(n.Transition,{"leave-active-class":"duration-200"},{default:(0,n.withCtx)((function(){return[(0,n.withDirectives)((0,n.createElementVNode)("div",r,[(0,n.createVNode)(n.Transition,{"enter-active-class":"ease-out duration-300","enter-from-class":"opacity-0","enter-to-class":"opacity-100","leave-active-class":"ease-in duration-200","leave-from-class":"opacity-100","leave-to-class":"opacity-0"},{default:(0,n.withCtx)((function(){return[(0,n.withDirectives)((0,n.createElementVNode)("div",{class:"fixed inset-0 transform transition-all",onClick:t[0]||(t[0]=function(){return e.close&&e.close.apply(e,arguments)})},a,512),[[n.vShow,e.show]])]})),_:1}),(0,n.createVNode)(n.Transition,{"enter-active-class":"ease-out duration-300","enter-from-class":"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95","enter-to-class":"opacity-100 translate-y-0 sm:scale-100","leave-active-class":"ease-in duration-200","leave-from-class":"opacity-100 translate-y-0 sm:scale-100","leave-to-class":"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95"},{default:(0,n.withCtx)((function(){return[(0,n.withDirectives)((0,n.createElementVNode)("div",{class:(0,n.normalizeClass)(["mb-6 bg-white rounded-lg overflow-hidden shadow-xl transform transition-all sm:w-full sm:mx-auto",e.maxWidthClass])},[e.show?(0,n.renderSlot)(e.$slots,"default",{key:0}):(0,n.createCommentVNode)("",!0)],2),[[n.vShow,e.show]])]})),_:3})],512),[[n.vShow,e.show]])]})),_:3})])}]])},5515:(e,t,o)=>{o.d(t,{Z:()=>l});var n=o(821),r=["type"];const a=(0,n.defineComponent)({props:{type:{type:String,default:"button"}}});const l=(0,o(3744).Z)(a,[["render",function(e,t,o,a,l,s){return(0,n.openBlock)(),(0,n.createElementBlock)("button",{type:e.type,class:"inline-flex items-center px-4 py-2 bg-white border border-gray-300 rounded-md font-semibold text-xs text-gray-700 uppercase tracking-widest shadow-sm hover:text-gray-500 focus:outline-none focus:border-blue-300 focus:ring focus:ring-blue-200 active:text-gray-800 active:bg-gray-50 disabled:opacity-25 transition"},[(0,n.renderSlot)(e.$slots,"default")],8,r)}]])},913:(e,t,o)=>{o.d(t,{Z:()=>s});var n=o(821),r={class:"hidden sm:block"},a=[(0,n.createElementVNode)("div",{class:"py-8"},[(0,n.createElementVNode)("div",{class:"border-t border-gray-200"})],-1)];const l={},s=(0,o(3744).Z)(l,[["render",function(e,t){return(0,n.openBlock)(),(0,n.createElementBlock)("div",r,a)}]])},5218:(e,t,o)=>{o.d(t,{Z:()=>m});var n=o(821),r={class:"md:col-span-1 flex justify-between"},a={class:"px-4 sm:px-0"},l={class:"text-lg font-medium text-gray-900"},s={class:"mt-1 text-sm text-gray-600"},i={class:"px-4 sm:px-0"};const c={},m=(0,o(3744).Z)(c,[["render",function(e,t){return(0,n.openBlock)(),(0,n.createElementBlock)("div",r,[(0,n.createElementVNode)("div",a,[(0,n.createElementVNode)("h3",l,[(0,n.renderSlot)(e.$slots,"title")]),(0,n.createElementVNode)("p",s,[(0,n.renderSlot)(e.$slots,"description")])]),(0,n.createElementVNode)("div",i,[(0,n.renderSlot)(e.$slots,"aside")])])}]])},824:(e,t,o)=>{o.r(t),o.d(t,{default:()=>x});var n=o(821),r=(0,n.createTextVNode)(" Delete Team "),a=(0,n.createTextVNode)(" Permanently delete this team. "),l=(0,n.createElementVNode)("div",{class:"max-w-xl text-sm text-gray-600"}," Once a team is deleted, all of its resources and data will be permanently deleted. Before deleting this team, please download any data or information regarding this team that you wish to retain. ",-1),s={class:"mt-5"},i=(0,n.createTextVNode)(" Delete Team "),c=(0,n.createTextVNode)(" Delete Team "),m=(0,n.createTextVNode)(" Are you sure you want to delete this team? Once a team is deleted, all of its resources and data will be permanently deleted. "),d=(0,n.createTextVNode)(" Cancel "),u=(0,n.createTextVNode)(" Delete Team ");var p=o(8050),f=o(8651),v=o(3309),h=o(5515);const g=(0,n.defineComponent)({props:["team"],components:{JetActionSection:p.Z,JetConfirmationModal:f.Z,JetDangerButton:v.Z,JetSecondaryButton:h.Z},data:function(){return{confirmingTeamDeletion:!1,deleting:!1,form:this.$inertia.form()}},methods:{confirmTeamDeletion:function(){this.confirmingTeamDeletion=!0},deleteTeam:function(){this.form.delete(route("teams.destroy",this.team),{errorBag:"deleteTeam"})}}});const x=(0,o(3744).Z)(g,[["render",function(e,t,o,p,f,v){var h=(0,n.resolveComponent)("jet-danger-button"),g=(0,n.resolveComponent)("jet-secondary-button"),x=(0,n.resolveComponent)("jet-confirmation-modal"),b=(0,n.resolveComponent)("jet-action-section");return(0,n.openBlock)(),(0,n.createBlock)(b,null,{title:(0,n.withCtx)((function(){return[r]})),description:(0,n.withCtx)((function(){return[a]})),content:(0,n.withCtx)((function(){return[l,(0,n.createElementVNode)("div",s,[(0,n.createVNode)(h,{onClick:e.confirmTeamDeletion},{default:(0,n.withCtx)((function(){return[i]})),_:1},8,["onClick"])]),(0,n.createVNode)(x,{show:e.confirmingTeamDeletion,onClose:t[1]||(t[1]=function(t){return e.confirmingTeamDeletion=!1})},{title:(0,n.withCtx)((function(){return[c]})),content:(0,n.withCtx)((function(){return[m]})),footer:(0,n.withCtx)((function(){return[(0,n.createVNode)(g,{onClick:t[0]||(t[0]=function(t){return e.confirmingTeamDeletion=!1})},{default:(0,n.withCtx)((function(){return[d]})),_:1}),(0,n.createVNode)(h,{class:(0,n.normalizeClass)(["ml-3",{"opacity-25":e.form.processing}]),onClick:e.deleteTeam,disabled:e.form.processing},{default:(0,n.withCtx)((function(){return[u]})),_:1},8,["onClick","class","disabled"])]})),_:1},8,["show"])]})),_:1})}]])},6178:(e,t,o)=>{o.r(t),o.d(t,{default:()=>pe});var n=o(821),r={key:0},a=(0,n.createTextVNode)(" Add Team Member "),l=(0,n.createTextVNode)(" Add a new team member to your team, allowing them to collaborate with you. "),s=(0,n.createElementVNode)("div",{class:"col-span-6"},[(0,n.createElementVNode)("div",{class:"max-w-xl text-sm text-gray-600"}," Please provide the email address of the person you would like to add to this team. ")],-1),i={class:"col-span-6 sm:col-span-4"},c={key:0,class:"col-span-6 lg:col-span-4"},m={class:"relative z-0 mt-1 border border-gray-200 rounded-lg cursor-pointer"},d=["onClick"],u={class:"flex items-center"},p={key:0,class:"ml-2 h-5 w-5 text-green-400",fill:"none","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",stroke:"currentColor",viewBox:"0 0 24 24"},f=[(0,n.createElementVNode)("path",{d:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"},null,-1)],v={class:"mt-2 text-xs text-gray-600 text-left"},h=(0,n.createTextVNode)(" Added. "),g=(0,n.createTextVNode)(" Add "),x={key:1},b=(0,n.createTextVNode)(" Pending Team Invitations "),y=(0,n.createTextVNode)(" These people have been invited to your team and have been sent an invitation email. They may join the team by accepting the email invitation. "),k={class:"space-y-6"},C={class:"text-gray-600"},w={class:"flex items-center"},V=["onClick"],N={key:2},T=(0,n.createTextVNode)(" Team Members "),B=(0,n.createTextVNode)(" All of the people that are part of this team. "),E={class:"space-y-6"},S={class:"flex items-center"},M=["src","alt"],Z={class:"ml-4"},R={class:"flex items-center"},F=["onClick"],j={key:1,class:"ml-2 text-sm text-gray-400"},$=["onClick"],_=(0,n.createTextVNode)(" Manage Role "),D={key:0},J={class:"relative z-0 mt-1 border border-gray-200 rounded-lg cursor-pointer"},z=["onClick"],L={class:"flex items-center"},A={key:0,class:"ml-2 h-5 w-5 text-green-400",fill:"none","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",stroke:"currentColor",viewBox:"0 0 24 24"},P=[(0,n.createElementVNode)("path",{d:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"},null,-1)],I={class:"mt-2 text-xs text-gray-600"},W=(0,n.createTextVNode)(" Cancel "),U=(0,n.createTextVNode)(" Save "),O=(0,n.createTextVNode)(" Leave Team "),H=(0,n.createTextVNode)(" Are you sure you would like to leave this team? "),q=(0,n.createTextVNode)(" Cancel "),G=(0,n.createTextVNode)(" Leave "),K=(0,n.createTextVNode)(" Remove Team Member "),Q=(0,n.createTextVNode)(" Are you sure you would like to remove this person from the team? "),X=(0,n.createTextVNode)(" Cancel "),Y=(0,n.createTextVNode)(" Remove ");var ee=o(8789),te=o(8050),oe=o(7020),ne=o(8651),re=o(3309),ae=o(7637),le=o(9153),se=o(7292),ie=o(675),ce=o(6138),me=o(5515),de=o(913);const ue=(0,n.defineComponent)({components:{JetActionMessage:ee.Z,JetActionSection:te.Z,JetButton:oe.Z,JetConfirmationModal:ne.Z,JetDangerButton:re.Z,JetDialogModal:ae.Z,JetFormSection:le.Z,JetInput:se.Z,JetInputError:ie.Z,JetLabel:ce.Z,JetSecondaryButton:me.Z,JetSectionBorder:de.Z},props:["team","availableRoles","userPermissions"],data:function(){return{addTeamMemberForm:this.$inertia.form({email:"",role:null}),updateRoleForm:this.$inertia.form({role:null}),leaveTeamForm:this.$inertia.form(),removeTeamMemberForm:this.$inertia.form(),currentlyManagingRole:!1,managingRoleFor:null,confirmingLeavingTeam:!1,teamMemberBeingRemoved:null}},methods:{addTeamMember:function(){var e=this;this.addTeamMemberForm.post(route("team-members.store",this.team),{errorBag:"addTeamMember",preserveScroll:!0,onSuccess:function(){return e.addTeamMemberForm.reset()}})},cancelTeamInvitation:function(e){this.$inertia.delete(route("team-invitations.destroy",e),{preserveScroll:!0})},manageRole:function(e){this.managingRoleFor=e,this.updateRoleForm.role=e.membership.role,this.currentlyManagingRole=!0},updateRole:function(){var e=this;this.updateRoleForm.put(route("team-members.update",[this.team,this.managingRoleFor]),{preserveScroll:!0,onSuccess:function(){return e.currentlyManagingRole=!1}})},confirmLeavingTeam:function(){this.confirmingLeavingTeam=!0},leaveTeam:function(){this.leaveTeamForm.delete(route("team-members.destroy",[this.team,this.$page.props.user]))},confirmTeamMemberRemoval:function(e){this.teamMemberBeingRemoved=e},removeTeamMember:function(){var e=this;this.removeTeamMemberForm.delete(route("team-members.destroy",[this.team,this.teamMemberBeingRemoved]),{errorBag:"removeTeamMember",preserveScroll:!0,preserveState:!0,onSuccess:function(){return e.teamMemberBeingRemoved=null}})},displayableRole:function(e){return this.availableRoles.find((function(t){return t.key===e})).name}}});const pe=(0,o(3744).Z)(ue,[["render",function(e,t,o,ee,te,oe){var ne=(0,n.resolveComponent)("jet-section-border"),re=(0,n.resolveComponent)("jet-label"),ae=(0,n.resolveComponent)("jet-input"),le=(0,n.resolveComponent)("jet-input-error"),se=(0,n.resolveComponent)("jet-action-message"),ie=(0,n.resolveComponent)("jet-button"),ce=(0,n.resolveComponent)("jet-form-section"),me=(0,n.resolveComponent)("jet-action-section"),de=(0,n.resolveComponent)("jet-secondary-button"),ue=(0,n.resolveComponent)("jet-dialog-modal"),pe=(0,n.resolveComponent)("jet-danger-button"),fe=(0,n.resolveComponent)("jet-confirmation-modal");return(0,n.openBlock)(),(0,n.createElementBlock)("div",null,[e.userPermissions.canAddTeamMembers?((0,n.openBlock)(),(0,n.createElementBlock)("div",r,[(0,n.createVNode)(ne),(0,n.createVNode)(ce,{onSubmitted:e.addTeamMember},{title:(0,n.withCtx)((function(){return[a]})),description:(0,n.withCtx)((function(){return[l]})),form:(0,n.withCtx)((function(){return[s,(0,n.createElementVNode)("div",i,[(0,n.createVNode)(re,{for:"email",value:"Email"}),(0,n.createVNode)(ae,{id:"email",type:"email",class:"mt-1 block w-full",modelValue:e.addTeamMemberForm.email,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.addTeamMemberForm.email=t})},null,8,["modelValue"]),(0,n.createVNode)(le,{message:e.addTeamMemberForm.errors.email,class:"mt-2"},null,8,["message"])]),e.availableRoles.length>0?((0,n.openBlock)(),(0,n.createElementBlock)("div",c,[(0,n.createVNode)(re,{for:"roles",value:"Role"}),(0,n.createVNode)(le,{message:e.addTeamMemberForm.errors.role,class:"mt-2"},null,8,["message"]),(0,n.createElementVNode)("div",m,[((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(e.availableRoles,(function(t,o){return(0,n.openBlock)(),(0,n.createElementBlock)("button",{type:"button",class:(0,n.normalizeClass)(["relative px-4 py-3 inline-flex w-full rounded-lg focus:z-10 focus:outline-none focus:border-blue-300 focus:ring focus:ring-blue-200",{"border-t border-gray-200 rounded-t-none":o>0,"rounded-b-none":o!=Object.keys(e.availableRoles).length-1}]),onClick:function(o){return e.addTeamMemberForm.role=t.key},key:t.key},[(0,n.createElementVNode)("div",{class:(0,n.normalizeClass)({"opacity-50":e.addTeamMemberForm.role&&e.addTeamMemberForm.role!=t.key})},[(0,n.createElementVNode)("div",u,[(0,n.createElementVNode)("div",{class:(0,n.normalizeClass)(["text-sm text-gray-600",{"font-semibold":e.addTeamMemberForm.role==t.key}])},(0,n.toDisplayString)(t.name),3),e.addTeamMemberForm.role==t.key?((0,n.openBlock)(),(0,n.createElementBlock)("svg",p,f)):(0,n.createCommentVNode)("",!0)]),(0,n.createElementVNode)("div",v,(0,n.toDisplayString)(t.description),1)],2)],10,d)})),128))])])):(0,n.createCommentVNode)("",!0)]})),actions:(0,n.withCtx)((function(){return[(0,n.createVNode)(se,{on:e.addTeamMemberForm.recentlySuccessful,class:"mr-3"},{default:(0,n.withCtx)((function(){return[h]})),_:1},8,["on"]),(0,n.createVNode)(ie,{class:(0,n.normalizeClass)({"opacity-25":e.addTeamMemberForm.processing}),disabled:e.addTeamMemberForm.processing},{default:(0,n.withCtx)((function(){return[g]})),_:1},8,["class","disabled"])]})),_:1},8,["onSubmitted"])])):(0,n.createCommentVNode)("",!0),e.team.team_invitations.length>0&&e.userPermissions.canAddTeamMembers?((0,n.openBlock)(),(0,n.createElementBlock)("div",x,[(0,n.createVNode)(ne),(0,n.createVNode)(me,{class:"mt-10 sm:mt-0"},{title:(0,n.withCtx)((function(){return[b]})),description:(0,n.withCtx)((function(){return[y]})),content:(0,n.withCtx)((function(){return[(0,n.createElementVNode)("div",k,[((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(e.team.team_invitations,(function(t){return(0,n.openBlock)(),(0,n.createElementBlock)("div",{class:"flex items-center justify-between",key:t.id},[(0,n.createElementVNode)("div",C,(0,n.toDisplayString)(t.email),1),(0,n.createElementVNode)("div",w,[e.userPermissions.canRemoveTeamMembers?((0,n.openBlock)(),(0,n.createElementBlock)("button",{key:0,class:"cursor-pointer ml-6 text-sm text-red-500 focus:outline-none",onClick:function(o){return e.cancelTeamInvitation(t)}}," Cancel ",8,V)):(0,n.createCommentVNode)("",!0)])])})),128))])]})),_:1})])):(0,n.createCommentVNode)("",!0),e.team.users.length>0?((0,n.openBlock)(),(0,n.createElementBlock)("div",N,[(0,n.createVNode)(ne),(0,n.createVNode)(me,{class:"mt-10 sm:mt-0"},{title:(0,n.withCtx)((function(){return[T]})),description:(0,n.withCtx)((function(){return[B]})),content:(0,n.withCtx)((function(){return[(0,n.createElementVNode)("div",E,[((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(e.team.users,(function(o){return(0,n.openBlock)(),(0,n.createElementBlock)("div",{class:"flex items-center justify-between",key:o.id},[(0,n.createElementVNode)("div",S,[(0,n.createElementVNode)("img",{class:"w-8 h-8 rounded-full",src:o.profile_photo_url,alt:o.name},null,8,M),(0,n.createElementVNode)("div",Z,(0,n.toDisplayString)(o.name),1)]),(0,n.createElementVNode)("div",R,[e.userPermissions.canAddTeamMembers&&e.availableRoles.length?((0,n.openBlock)(),(0,n.createElementBlock)("button",{key:0,class:"ml-2 text-sm text-gray-400 underline",onClick:function(t){return e.manageRole(o)}},(0,n.toDisplayString)(e.displayableRole(o.membership.role)),9,F)):e.availableRoles.length?((0,n.openBlock)(),(0,n.createElementBlock)("div",j,(0,n.toDisplayString)(e.displayableRole(o.membership.role)),1)):(0,n.createCommentVNode)("",!0),e.$page.props.user.id===o.id?((0,n.openBlock)(),(0,n.createElementBlock)("button",{key:2,class:"cursor-pointer ml-6 text-sm text-red-500",onClick:t[1]||(t[1]=function(){return e.confirmLeavingTeam&&e.confirmLeavingTeam.apply(e,arguments)})}," Leave ")):(0,n.createCommentVNode)("",!0),e.userPermissions.canRemoveTeamMembers?((0,n.openBlock)(),(0,n.createElementBlock)("button",{key:3,class:"cursor-pointer ml-6 text-sm text-red-500",onClick:function(t){return e.confirmTeamMemberRemoval(o)}}," Remove ",8,$)):(0,n.createCommentVNode)("",!0)])])})),128))])]})),_:1})])):(0,n.createCommentVNode)("",!0),(0,n.createVNode)(ue,{show:e.currentlyManagingRole,onClose:t[3]||(t[3]=function(t){return e.currentlyManagingRole=!1})},{title:(0,n.withCtx)((function(){return[_]})),content:(0,n.withCtx)((function(){return[e.managingRoleFor?((0,n.openBlock)(),(0,n.createElementBlock)("div",D,[(0,n.createElementVNode)("div",J,[((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(e.availableRoles,(function(t,o){return(0,n.openBlock)(),(0,n.createElementBlock)("button",{type:"button",class:(0,n.normalizeClass)(["relative px-4 py-3 inline-flex w-full rounded-lg focus:z-10 focus:outline-none focus:border-blue-300 focus:ring focus:ring-blue-200",{"border-t border-gray-200 rounded-t-none":o>0,"rounded-b-none":o!==Object.keys(e.availableRoles).length-1}]),onClick:function(o){return e.updateRoleForm.role=t.key},key:t.key},[(0,n.createElementVNode)("div",{class:(0,n.normalizeClass)({"opacity-50":e.updateRoleForm.role&&e.updateRoleForm.role!==t.key})},[(0,n.createElementVNode)("div",L,[(0,n.createElementVNode)("div",{class:(0,n.normalizeClass)(["text-sm text-gray-600",{"font-semibold":e.updateRoleForm.role===t.key}])},(0,n.toDisplayString)(t.name),3),e.updateRoleForm.role===t.key?((0,n.openBlock)(),(0,n.createElementBlock)("svg",A,P)):(0,n.createCommentVNode)("",!0)]),(0,n.createElementVNode)("div",I,(0,n.toDisplayString)(t.description),1)],2)],10,z)})),128))])])):(0,n.createCommentVNode)("",!0)]})),footer:(0,n.withCtx)((function(){return[(0,n.createVNode)(de,{onClick:t[2]||(t[2]=function(t){return e.currentlyManagingRole=!1})},{default:(0,n.withCtx)((function(){return[W]})),_:1}),(0,n.createVNode)(ie,{class:(0,n.normalizeClass)(["ml-3",{"opacity-25":e.updateRoleForm.processing}]),onClick:e.updateRole,disabled:e.updateRoleForm.processing},{default:(0,n.withCtx)((function(){return[U]})),_:1},8,["onClick","class","disabled"])]})),_:1},8,["show"]),(0,n.createVNode)(fe,{show:e.confirmingLeavingTeam,onClose:t[5]||(t[5]=function(t){return e.confirmingLeavingTeam=!1})},{title:(0,n.withCtx)((function(){return[O]})),content:(0,n.withCtx)((function(){return[H]})),footer:(0,n.withCtx)((function(){return[(0,n.createVNode)(de,{onClick:t[4]||(t[4]=function(t){return e.confirmingLeavingTeam=!1})},{default:(0,n.withCtx)((function(){return[q]})),_:1}),(0,n.createVNode)(pe,{class:(0,n.normalizeClass)(["ml-3",{"opacity-25":e.leaveTeamForm.processing}]),onClick:e.leaveTeam,disabled:e.leaveTeamForm.processing},{default:(0,n.withCtx)((function(){return[G]})),_:1},8,["onClick","class","disabled"])]})),_:1},8,["show"]),(0,n.createVNode)(fe,{show:e.teamMemberBeingRemoved,onClose:t[7]||(t[7]=function(t){return e.teamMemberBeingRemoved=null})},{title:(0,n.withCtx)((function(){return[K]})),content:(0,n.withCtx)((function(){return[Q]})),footer:(0,n.withCtx)((function(){return[(0,n.createVNode)(de,{onClick:t[6]||(t[6]=function(t){return e.teamMemberBeingRemoved=null})},{default:(0,n.withCtx)((function(){return[X]})),_:1}),(0,n.createVNode)(pe,{class:(0,n.normalizeClass)(["ml-3",{"opacity-25":e.removeTeamMemberForm.processing}]),onClick:e.removeTeamMember,disabled:e.removeTeamMemberForm.processing},{default:(0,n.withCtx)((function(){return[Y]})),_:1},8,["onClick","class","disabled"])]})),_:1},8,["show"])])}]])},6699:(e,t,o)=>{o.r(t),o.d(t,{default:()=>k});var n=o(821),r=(0,n.createTextVNode)(" Team Name "),a=(0,n.createTextVNode)(" The team's name and owner information. "),l={class:"col-span-6"},s={class:"flex items-center mt-2"},i=["src","alt"],c={class:"ml-4 leading-tight"},m={class:"text-gray-700 text-sm"},d={class:"col-span-6 sm:col-span-4"},u=(0,n.createTextVNode)(" Saved. "),p=(0,n.createTextVNode)(" Save ");var f=o(8789),v=o(7020),h=o(9153),g=o(7292),x=o(675),b=o(6138);const y=(0,n.defineComponent)({components:{JetActionMessage:f.Z,JetButton:v.Z,JetFormSection:h.Z,JetInput:g.Z,JetInputError:x.Z,JetLabel:b.Z},props:["team","permissions"],data:function(){return{form:this.$inertia.form({name:this.team.name})}},methods:{updateTeamName:function(){this.form.put(route("teams.update",this.team),{errorBag:"updateTeamName",preserveScroll:!0})}}});const k=(0,o(3744).Z)(y,[["render",function(e,t,o,f,v,h){var g=(0,n.resolveComponent)("jet-label"),x=(0,n.resolveComponent)("jet-input"),b=(0,n.resolveComponent)("jet-input-error"),y=(0,n.resolveComponent)("jet-action-message"),k=(0,n.resolveComponent)("jet-button"),C=(0,n.resolveComponent)("jet-form-section");return(0,n.openBlock)(),(0,n.createBlock)(C,{onSubmitted:e.updateTeamName},(0,n.createSlots)({title:(0,n.withCtx)((function(){return[r]})),description:(0,n.withCtx)((function(){return[a]})),form:(0,n.withCtx)((function(){return[(0,n.createElementVNode)("div",l,[(0,n.createVNode)(g,{value:"Team Owner"}),(0,n.createElementVNode)("div",s,[(0,n.createElementVNode)("img",{class:"w-12 h-12 rounded-full object-cover",src:e.team.owner.profile_photo_url,alt:e.team.owner.name},null,8,i),(0,n.createElementVNode)("div",c,[(0,n.createElementVNode)("div",null,(0,n.toDisplayString)(e.team.owner.name),1),(0,n.createElementVNode)("div",m,(0,n.toDisplayString)(e.team.owner.email),1)])])]),(0,n.createElementVNode)("div",d,[(0,n.createVNode)(g,{for:"name",value:"Team Name"}),(0,n.createVNode)(x,{id:"name",type:"text",class:"mt-1 block w-full",modelValue:e.form.name,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.form.name=t}),disabled:!e.permissions.canUpdateTeam},null,8,["modelValue","disabled"]),(0,n.createVNode)(b,{message:e.form.errors.name,class:"mt-2"},null,8,["message"])])]})),_:2},[e.permissions.canUpdateTeam?{name:"actions",fn:(0,n.withCtx)((function(){return[(0,n.createVNode)(y,{on:e.form.recentlySuccessful,class:"mr-3"},{default:(0,n.withCtx)((function(){return[u]})),_:1},8,["on"]),(0,n.createVNode)(k,{class:(0,n.normalizeClass)({"opacity-25":e.form.processing}),disabled:e.form.processing},{default:(0,n.withCtx)((function(){return[p]})),_:1},8,["class","disabled"])]}))}:void 0]),1032,["onSubmitted"])}]])},968:(e,t,o)=>{o.r(t),o.d(t,{default:()=>m});var n=o(821),r={class:"max-w-7xl mx-auto py-10 sm:px-6 lg:px-8"};var a=o(824),l=o(913),s=o(6178),i=o(6699);const c=(0,n.defineComponent)({props:["team","availableRoles","permissions"],components:{DeleteTeamForm:a.default,JetSectionBorder:l.Z,TeamMemberManager:s.default,UpdateTeamNameForm:i.default}});const m=(0,o(3744).Z)(c,[["render",function(e,t,o,a,l,s){var i=(0,n.resolveComponent)("Head"),c=(0,n.resolveComponent)("update-team-name-form"),m=(0,n.resolveComponent)("team-member-manager"),d=(0,n.resolveComponent)("jet-section-border"),u=(0,n.resolveComponent)("delete-team-form");return(0,n.openBlock)(),(0,n.createElementBlock)(n.Fragment,null,[(0,n.createVNode)(i,{title:"Team Settings"}),(0,n.createElementVNode)("div",r,[(0,n.createVNode)(c,{team:e.team,permissions:e.permissions},null,8,["team","permissions"]),(0,n.createVNode)(m,{class:"mt-10 sm:mt-0",team:e.team,"available-roles":e.availableRoles,"user-permissions":e.permissions},null,8,["team","available-roles","user-permissions"]),e.permissions.canDeleteTeam&&!e.team.personal_team?((0,n.openBlock)(),(0,n.createElementBlock)(n.Fragment,{key:0},[(0,n.createVNode)(d),(0,n.createVNode)(u,{class:"mt-10 sm:mt-0",team:e.team},null,8,["team"])],64)):(0,n.createCommentVNode)("",!0)])],64)}]])}}]);