"use strict";(globalThis.webpackChunk_affine_web=globalThis.webpackChunk_affine_web||[]).push([[6610],{6610:(e,a,n)=>{n.d(a,{jE:()=>p,lq:()=>g,bI:()=>x,dK:()=>j});var t=n(36870),r=n(94225),i=n(24312),s=n(80198),l=n(55683),o=n(23675),m="_1kcfi63",c="_1kcfi65";let p=({onOpenWorkspace:e,inviteInfo:a})=>{let n=(0,i.s9)();return(0,t.jsx)(r.r,{title:n["Successfully joined!"](),subtitle:(0,t.jsxs)(o.Z6,{alignItems:"center",children:[(0,t.jsx)(s.e,{url:a.user.avatarUrl||"",name:a.user.name,size:20}),(0,t.jsx)("span",{className:m,children:a.user.name}),n["invited you to join"](),(0,t.jsx)(s.e,{url:`data:image/png;base64,${a.workspace.avatar}`,name:a.workspace.name,size:20,style:{marginLeft:4},colorfulFallback:!0}),(0,t.jsx)("span",{className:m,children:a.workspace.name})]}),children:(0,t.jsx)(l.$n,{variant:"primary",size:"large",onClick:e,children:n["Visit Workspace"]()})})};var u=n(53216),d=n(86326),b=n(34310),f=n(51629);let g=({open:e,setOpen:a,onConfirm:n,isMutating:s})=>{let l=(0,i.s9)(),[o,m]=(0,d.useState)(""),[c]=(0,d.useState)(u.aX.Write),[p,g]=(0,d.useState)(!0),x=(0,d.useCallback)(()=>{if(!f.U.test(o)){g(!1);return}g(!0),n({email:o,permission:c})},[o,n,c]);return(0,d.useEffect)(()=>{e||(m(""),g(!0))},[e]),(0,t.jsx)(b.uo,{open:e,onOpenChange:a,title:l["Invite Members"](),description:l["Invite Members Message"](),cancelText:l["com.arms.inviteModal.button.cancel"](),contentOptions:{"data-testid":"invite-modal",style:{padding:"20px 26px"}},confirmText:l.Invite(),confirmButtonOptions:{loading:s,variant:"primary","data-testid":"confirm-enable-affine-cloud-button"},onConfirm:x,children:(0,t.jsx)(r.F0,{disabled:s,placeholder:"email@example.com",value:o,onChange:m,error:!p,errorHint:p?"":l["com.arms.auth.sign.email.error"](),onEnter:x,size:"large"})})},x=({isFreePlan:e,open:a,plan:n,quota:r,setOpen:s,onConfirm:l})=>{let o=(0,i.s9)(),m=(0,d.useCallback)(()=>{s(!1),e&&l()},[l,s,e]);return(0,t.jsx)(b.uo,{open:a,onOpenChange:s,title:o["com.arms.payment.member-limit.title"](),description:o[e?"com.arms.payment.member-limit.free.description":"com.arms.payment.member-limit.pro.description"]({planName:n,quota:r}),cancelButtonOptions:{style:{display:e?"":"none"}},confirmText:o[e?"com.arms.payment.member-limit.free.confirm":"com.arms.payment.member-limit.pro.confirm"](),confirmButtonOptions:{variant:"primary"},onConfirm:m})};var C=n(45483),h=n(37064),v=n(97302),k=n.n(v);let j=({totalCount:e,countPerPage:a,onPageChange:n})=>{let r=(0,d.useCallback)(t=>{n(t.selected*a%e)},[a,n,e]),i=(0,d.useMemo)(()=>Math.ceil(e/a),[a,e]);return(0,t.jsx)(k(),{onPageChange:r,pageRangeDisplayed:3,marginPagesDisplayed:2,pageCount:i,previousLabel:(0,t.jsx)(C.ArrowLeftSmallIcon,{}),nextLabel:(0,t.jsx)(C.ArrowRightSmallIcon,{}),pageClassName:c,previousClassName:(0,h.A)(c,"label"),nextClassName:(0,h.A)(c,"label"),breakLabel:"...",breakClassName:c,containerClassName:"_1kcfi64",activeClassName:"active",renderOnZeroPageCount:null})}}}]); //# sourceMappingURL=chunk.6610.0d25db23.js.map