"use strict";(globalThis.webpackChunkPlesk=globalThis.webpackChunkPlesk||[]).push([["views/smb/user/list"],{1941(e,t,s){s.r(t),s.d(t,{default:()=>d});var a=s(763),r=s.n(a),i=s(95),l=s(1669);const n={hint:r().string.isRequired,expandable:r().bool},o=(0,l.default)(i.Hint,{propsList:Object.keys(n),setters:{hint:"setHint"},defaultProps:{expandable:!1}});o.displayName="JswHint",o.propTypes=n;const d=o},1668(e,t,s){s.r(t),s.d(t,{default:()=>c});var a=s(763),r=s.n(a),i=s(95),l=s(1669);const n={id:r().string,dataUrl:r().string,operations:r().array,itemActions:r().object,columns:r().array,data:r().shape({data:r().array,state:r().object,pager:r().object,locale:r().object,additional:r().object,pathbar:r().any}),searchFilters:r().object,searchOveral:r().string,disabledSelectHint:r().string,isDisabledItem:r().func,onRedraw:r().func,emptyViewMode:r().oneOf(["all","items"]),emptyView:r().any},o={id:void 0,dataUrl:void 0,operations:void 0,itemActions:void 0,columns:void 0,data:void 0,searchFilters:void 0,searchOveral:void 0,disabledSelectHint:void 0,isDisabledItem:void 0,onRedraw:void 0,emptyViewMode:void 0,emptyView:void 0},d=(0,l.default)(i.List,{propsList:Object.keys(n),defaultProps:o});d.displayName="JswList",d.propTypes=n;const c=d},1672(e,t,s){s.r(t),s.d(t,{default:()=>c});var a=s(763),r=s.n(a),i=s(379),l=s(95),n=s(808),o=s(378);const d=({items:e})=>e&&e.length>1?(0,o.jsx)(i.Tabs,{active:e.findIndex(({containerCls:e})=>"active"===e)+1,children:e.map(({title:e,href:t},s)=>(0,o.jsx)(i.Tab,{title:e,component:n.default,to:(0,l.prepareUrl)(t)},s))}):null;d.propTypes={items:r().arrayOf(r().shape({title:r().string.isRequired,href:r().string.isRequired,containerCls:r().string}))};const c=d},1669(e,t,s){s.r(t),s.d(t,{default:()=>i});var a=s(378),r=s(95);const i=(e,{propsList:t=[],setters:s={},defaultProps:i={}})=>l=>{const n=(0,a.useRef)(),o=(0,a.useRef)(),[d,c]=Object.entries({...i,...l}).reduce((e,[s,a])=>(e[t.includes(s)?0:1][s]=a,e),[{},{}]),u=t.map(e=>{const t=d[e];return s[e]?(o.current?.[s[e]](t),null):t});return(0,a.useLayoutEffect)(()=>(o.current=new e(d),(0,r.render)(n.current,o.current),()=>{o.current.remove(),o.current=null}),[c.key,...u]),(0,a.jsx)("div",{ref:n,...c})}},1987(e,t,s){s.r(t),s.d(t,{default:()=>c});var a=s(378),r=s(763),i=s.n(r),l=s(95),n=s(1668);const o=l.Locale.getSection("smb.components.lists.users"),d=({data:e,searchFilters:t,currentUserId:s})=>{const r=(0,a.useMemo)(()=>[l.list.COLUMN_SELECTION,{header:o.lmsg("contactName"),sortable:!0,dataIndex:"contactName",renderer:e=>`<a data-cy="${(0,l.escapeHtml)(e.login)}" href="/smb/user/overview/id/${e.id}">${(0,l.escapeHtml)(e.contactName)}</a>`+(1==e.isLocked?`<span class="hint-attention ">${o.lmsg("statusBlocked")}</span>`:"")},{header:o.lmsg("email"),sortable:!0,cls:"minor",dataIndex:"email",renderer:e=>e.email?`<a href="mailto:${e.email}">${e.email}</a>`:""},{header:o.lmsg("role"),cls:"minor",sortable:!0,dataIndex:"roleName"}],[]),i=(0,a.useMemo)(()=>[{componentType:l.SmallButton,title:o.lmsg("buttonAddNewUser"),description:o.lmsg("hintAddNewUser"),addCls:"sb-add-user btn-primary",href:"/smb/user/create"},{componentType:l.bar.Separator},{componentType:l.SmallButton,id:"buttonRemoveUser",title:o.lmsg("remove"),description:o.lmsg("hintRemove"),addCls:"sb-remove-selected",handler(e){(0,l.getComponent)("users-list").execGroupOperation({url:"/smb/user/delete/?redirect=/smb/user/list/",subtype:"delete",mouseEvent:e,locale:{confirmOnGroupOperation:o.lmsg("confirmOnDelete")}})}}],[]),d=(0,a.useCallback)(e=>1==e.isBuiltIn||e.id==s,[s]);return(0,a.jsx)(n.default,{id:"users-list",data:e,dataUrl:"/smb/user/list-data",disabledSelectHint:o.lmsg("disabledSelectHint"),searchOveral:"name",searchFilters:t,isDisabledItem:d,columns:r,operations:i})};d.propTypes={data:n.default.propTypes.data.isRequired,searchFilters:n.default.propTypes.searchFilters.isRequired,currentUserId:i().string.isRequired};const c=d},1986(e,t,s){s.r(t),s.d(t,{default:()=>u});var a=s(95),r=s(1941),i=s(1672),l=s(777),n=s(1987),o=s(378);const d=a.Locale.getSection("smb.controllers.user.list"),c=({tabs:e,...t})=>(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(i.default,{items:e}),(0,o.jsx)(r.default,{hint:d.lmsg("hint"),expandable:!0}),(0,o.jsx)(n.default,{...t})]});c.propTypes={tabs:i.default.propTypes.items.isRequired};const u=(0,l.withPageLayout)(c)}}]);
//# sourceMappingURL=list.js.map?3d9ee1562454e6534aaf