(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9888],{42809:function(e,l,n){"use strict";n.d(l,{Q:function(){return c}});var t=n(85893);n(67294);var r=n(4483),i=n(11183);let s=()=>{let e=(0,i.ac)("(max-width: 767px)");return e?(0,t.jsx)(t.Fragment,{children:(0,t.jsxs)("div",{className:"inline-flex items-center gap-2",children:[(0,t.jsx)(r.Z,{src:"/images/workplace-offline.svg",isServerImage:!1,type:"square4px",size:"sm"}),(0,t.jsx)("div",{className:"text-nm line-clamp-1",style:{wordBreak:"break-all"},children:"По выезду"})]})}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(r.Z,{src:"/images/workplace-offline.svg",isServerImage:!1,type:"square4px"}),(0,t.jsx)("div",{className:"flex flex-col justify-center flex-1 gap-2",children:(0,t.jsx)("span",{className:"font-medium break-all line-clamp-2",children:"По выезду"})})]})},c=e=>{let{avatarSrc:l,label:n,description:s,typeRole:c}=e,a=(0,i.ac)("(max-width: 767px)");return a?(0,t.jsx)(t.Fragment,{children:(0,t.jsxs)("div",{className:"inline-flex items-center gap-2",children:[(0,t.jsx)(r.Z,{src:l,isServerImage:!!l,type:"square4px",typeRole:c,size:a?"sm":"md"}),(0,t.jsxs)("div",{className:"text-nm line-clamp-1",style:{wordBreak:"break-all"},children:[n||null,", ",s||null]})]})}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(r.Z,{src:l,isServerImage:!!l,type:"square4px",typeRole:c,size:a?"sm":"md"}),(0,t.jsxs)("div",{className:"flex flex-col justify-center flex-1 gap-2",children:[n?(0,t.jsx)("span",{className:"font-medium line-clamp-1",style:{wordBreak:"break-word"},children:n}):null,s?(0,t.jsx)("span",{className:"text-sm line-clamp-1",children:s}):null]})]})},a=()=>{let e=(0,i.ac)("(max-width: 767px)");return e?(0,t.jsx)(t.Fragment,{children:(0,t.jsxs)("div",{className:"inline-flex items-center gap-2",children:[(0,t.jsx)(r.Z,{src:"/images/workplace-online.svg",isServerImage:!1,type:"square4px",size:"sm"}),(0,t.jsx)("div",{className:"text-nm line-clamp-1",style:{wordBreak:"break-all"},children:"Онлайн"})]})}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(r.Z,{src:"/images/workplace-online.svg",isServerImage:!1,type:"square4px"}),(0,t.jsx)("div",{className:"flex flex-col justify-center flex-1 gap-2",children:(0,t.jsx)("span",{className:"font-medium break-all line-clamp-2",children:"Онлайн"})})]})},o=e=>{let{length:l=0,title:n="Все",...r}=e;return(0,t.jsxs)("div",{className:"flex items-center gap-3 w-full h-full",...r,children:[(0,t.jsx)("div",{className:"flex items-center justify-center w-10 h-10 rounded-lg bg-neutrals-white text-lgSemibold text-textColor-color",children:l}),(0,t.jsx)("span",{className:"text-nm",children:n})]})};l.Z=e=>{let{avatarSrc:l,label:n,description:r,type:i,onClick:d,title:u,length:p}=e;return(0,t.jsxs)("div",{className:"flex gap-2 grow",onClick:d,children:["club"===i?(0,t.jsx)(c,{avatarSrc:l,label:n,description:r,typeRole:"club_manager"}):null,"trainer"===i?(0,t.jsx)(c,{avatarSrc:l,label:n,description:r,typeRole:i}):null,"student"===i||"user"===i?(0,t.jsx)(c,{avatarSrc:l,label:n,description:r,typeRole:"student"}):null,"online"===i?(0,t.jsx)(a,{}):null,"visit"===i?(0,t.jsx)(s,{}):null,"all"===i?(0,t.jsx)(o,{title:u,length:p}):null]})}},21550:function(e,l,n){"use strict";n.d(l,{Z:function(){return w}});var t=n(85893),r=n(90603),i=n(67294),s=n(78541),c=n.n(s),a=n(90512),o=e=>{let{children:l,isOpen:n,isMoreOne:r,color:i,isViewOnly:s,onClick:c,className:o}=e,d=(0,a.Z)("md:h-[65px] flex flex-grow gap-2 p-3 rounded-lg bg-neutrals-5 hover:border-blue-primary active:bg-blue-light02 border  cursor-pointer transition-colors ","neutralBackground"===i&&"bg-neutrals-5","whiteBackground"===i&&"bg-neutrals-white",n&&r?"border-blue-primary":"border-neutrals-5",s?"pointer-events-none":"",o);return(0,t.jsx)("div",{className:"".concat(d),onClick:c,children:l})},d=e=>{let{children:l}=e;return(0,t.jsx)("ul",{className:"absolute top-full mt-1 w-full flex flex-col rounded-lg overflow-auto bg-neutrals-white shadow-md max-h-[190px] z-20",children:l})},u=e=>{let{children:l}=e,n=(0,a.Z)("flex gap-2 p-3 hover:bg-neutrals-5 cursor-pointer active:bg-blue-light02 group transition-colors");return(0,t.jsx)("li",{className:"".concat(n),children:l})},p=n(51526),m=n(81550),x=n(41664),v=n.n(x),_=()=>(0,t.jsx)(t.Fragment,{children:(0,t.jsx)("div",{className:"flex flex-col items-center justify-center w-full gap-1",children:(0,t.jsxs)("span",{className:"text-center",children:["Нет места работы,"," ",(0,t.jsx)(v(),{href:"/account/trainer/workplace",target:"_blank",className:"text-blue-primary lg:hover:underline lg:hover:underline-offset-4",children:"создать"})," "]})})}),g=n(42054),f=n(84033),h=n(91871),j=n(11183),w=e=>{let{className:l,classNameContainer:n,variant:s="filled",color:x="neutralBackground",error:v,label:w,isViewOnly:b,helperText:y,disabled:k,options:S,value:N,isOwn:Z,onChange:B,renderOption:E,renderSelectItem:F,tooltipContent:L}=e,[I,R]=(0,i.useState)(!1),z=S&&(null==S?void 0:S.length)>0,C=(0,i.useRef)(null),Y=e=>{z&&(R(!1),B&&B(e))};(0,i.useEffect)(()=>{let e=e=>{C.current&&!C.current.contains(e.target)&&R(!1)};return window.addEventListener("mousedown",e),()=>{window.removeEventListener("mousedown",e)}},[]);let q=(0,a.Z)(c().label,v&&c().error);return(0,j.ac)("(max-width: 767px)"),(0,t.jsx)(t.Fragment,{children:(0,t.jsxs)("div",{className:(0,a.Z)("relative select-none z-20 w-full space-y-2 ".concat(n)),ref:C,children:[w&&(0,t.jsxs)(h._,{className:q,children:[w," ",L?(0,t.jsx)(g.p,{renderOpener:e=>(0,t.jsx)(t.Fragment,{children:(0,t.jsx)("div",{...e,children:(0,t.jsx)(f.Z,{width:16,height:16,className:c().icon})})}),content:L}):""]}),(0,t.jsx)("div",{className:(0,a.Z)(k?"opacity-50 pointer-events-none":""),children:(0,t.jsxs)(o,{onClick:()=>R(!I),isOpen:I,isMoreOne:z,color:x,isViewOnly:b,children:[(null==S?void 0:S.length)===0&&Z&&!N?(0,t.jsx)(_,{}):F&&N&&F(N,()=>{R(!I)}),N?null:(0,t.jsx)(_,{}),z&&!b&&(0,t.jsx)(r.Z,{className:"".concat(I?"rotate-[180deg]":null," transition-transform ml-auto")})]})}),(0,t.jsx)(p.M,{children:I&&z?(0,t.jsx)(m.E.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.3,ease:"easeOut"},children:(0,t.jsx)(()=>(0,t.jsx)(d,{children:null==S?void 0:S.map(e=>(0,t.jsx)(u,{children:E?E(e,()=>Y(e)):e.label},e.value))}),{})}):null})]})})}},28108:function(e,l,n){"use strict";n.d(l,{a:function(){return r}});var t=n(59424);let r=e=>{if(!e)return{title:"",src:null,desc:null};if("club"===e.type){var l,n,r;return{title:(null==e?void 0:null===(l=e.club)||void 0===l?void 0:l.title)||"",src:(null==e?void 0:null===(n=e.club)||void 0===n?void 0:n.logo)?null==e?void 0:e.club.logo:null,desc:(null==e?void 0:null===(r=e.club)||void 0===r?void 0:r.address)||""}}return"online"===e.type?{title:t.Ww[e.type],src:t.uD}:{title:t.Ww[e.type],src:t.or}}},59424:function(e,l,n){"use strict";var t,r,i,s,c,a;n.d(l,{Ww:function(){return i},uD:function(){return o},or:function(){return d},BT:function(){return u}}),(s=t||(t={})).confirmed="Подтверждено",s.declined="Отклонено",s.pending="Ожидание",s.canceled="Отменено",s.deleted="Удалено",(c=r||(r={})).confirmed="Подтверждено",c.declined="Отклонено",c.pending="Ожидание",c.canceled="Отменено",c.deleted="Удалено",c.completed="Завершенный",c.rescheduled="перенесено",(a=i||(i={})).online="Онлайн",a.visit="По выезду",a.club="Клуб";let o="/images/workplace-online.svg",d="/images/workplace-offline.svg",u=e=>{var l,n,t,r,s,c,a;return(null==e?void 0:e.type)==="club"?{title:null==e?void 0:null===(l=e.club)||void 0===l?void 0:l.title,src:(null==e?void 0:null===(n=e.club)||void 0===n?void 0:n.logo)?null==e?void 0:null===(t=e.club)||void 0===t?void 0:t.logo:null,desc:null==e?void 0:null===(r=e.club)||void 0===r?void 0:r.address}:(null==e?void 0:e.type)==="online"?{title:i[e.type],src:o,desc:(null==e?void 0:null===(s=e.video_communication_services)||void 0===s?void 0:s.map(e=>e.title).join(","))||""}:(null==e?void 0:e.type)==="visit"?{title:i[e.type],src:d,desc:e.cities?null===(a=e.cities[0])||void 0===a?void 0:null===(c=a.city_districts)||void 0===c?void 0:c.map(e=>e.title).join(","):""}:{title:"",src:"",desc:""}}},84932:function(e,l,n){"use strict";var t=n(67294);l.Z=e=>{let l=(0,t.useRef)({x:0,y:0}),n=(0,t.useRef)(!1);(0,t.useEffect)(()=>{let t=e.current,r=e=>{l.current={x:e.pageX,y:e.pageY},n.current=!0},i=e=>{n.current&&(null==t||t.scrollBy(l.current.x-e.pageX,l.current.y-e.pageY),l.current={x:e.pageX,y:e.pageY})},s=()=>{n.current=!1};return null==t||t.addEventListener("mousedown",r),window.addEventListener("mousemove",i),window.addEventListener("mouseup",s),()=>{null==t||t.removeEventListener("mousedown",r),window.removeEventListener("mousemove",i),window.removeEventListener("mouseup",s)}},[e])}},78541:function(e){e.exports={select__wrapper:"Select_select__wrapper__JmfuI",hero:"Select_hero__aCUuI",label:"Select_label__BvYTN",open:"Select_open__YesCz",error:"Select_error__nNGkq",input:"Select_input__H_HHP",input__wrapper:"Select_input__wrapper__ObxFk",disabled:"Select_disabled__Zcu0g",icon:"Select_icon__YQtRk","icon--open":"Select_icon--open___fsFo","icon--error":"Select_icon--error__gkSPH","icon--disabled":"Select_icon--disabled__iedXk",neutralBackground:"Select_neutralBackground__ms5S5",filled:"Select_filled__lLvz5",outlined:"Select_outlined__8Mu3U",whiteBackground:"Select_whiteBackground__UYoYp",input__content:"Select_input__content__ewRjI","helper-text":"Select_helper-text__FD89I","error-text":"Select_error-text__Kug7w",options:"Select_options__bLdVB",options__item:"Select_options__item__8XhcT",selected:"Select_selected__4Lwfv"}}}]);