"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[570],{570:function(e,t,l){l.r(t),l.d(t,{default:function(){return o}});var n=l(5893),a=l(7294);function i(e){return(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:17.627,height:17.627,viewBox:"0 0 17.627 17.627",...e,children:(0,n.jsx)("path",{"data-name":"Path 539",d:"M42.879 43.852h-7.692a.663.663 0 000 1.326h9.992v-9.9a.663.663 0 10-1.326 0v7.6l-10.012-9.965a.657.657 0 00-.928.928z",transform:"rotate(45 54.254 -26.978) translate(8.485 -8.485)",fill:"currentColor"})})}var c=l(4838),s=l(415);function o(e){let{heading:t,people:l,allDepartments:o,display:r,showDepartment:d,showBio:m,imageAspectRatio:u,filterLabel:x,columns:h,design:f}=e,[v,p]=(0,a.useState)(null),[j,N]=(0,a.useState)(!1),g=e=>{p(e),N(!1)},b=!1,w="Velg avdeling";return("filtered"===r||"multiple_departments"===r)&&(b=!0,x&&(w=x)),(0,n.jsxs)("div",{className:"peoplegrid py-12 ".concat("default"==f?"bg-theme-dark":"bg-theme-body"),children:[(0,n.jsx)(c.Z,{className:"text-center font-bold text-5xl mb-4 ".concat("default"==f?"text-theme-text-inv":"text-theme-text"),level:"h3",children:t}),b?(0,n.jsxs)("div",{className:"text-center department-select ".concat("default"==f?"text-theme-text-inv":"text-theme-text"),children:[(0,n.jsx)("div",{children:(0,n.jsxs)("button",{"aria-label":"Vis avdelingsfilter",type:"button",onClick:()=>N(!j),className:"flex items-center m-auto opacity-80 hover:opacity-100 font-light",children:[(0,n.jsx)("span",{className:"mr-2 text-2xl",children:w})," ",(0,n.jsx)(i,{className:"duration-500 transition-all ".concat(j?"rotate-180":"")})]})}),(0,n.jsxs)("ul",{className:"my-4 overflow-hidden transition-all duration-500 ".concat(j?"max-h-[1000px] ":"max-h-0"),children:[(0,n.jsx)("li",{className:"dep-all",children:(0,n.jsx)("button",{className:"font-bold text-3xl py-2 hover:text-theme-main-alt",onClick:()=>g(null),children:"Se alle"})},"department-reset"),o.map((e,t)=>{var l,a;return(0,n.jsx)("li",{className:"".concat("dep-"+e.slug," ").concat("dep-"+t),children:(0,n.jsxs)("button",{className:"font-bold text-3xl py-2 hover:text-theme-main-alt",onClick:()=>g(e),children:[e.name,(null===(l=e.departmentExtra)||void 0===l?void 0:l.extraLabelText)&&(0,n.jsxs)("span",{className:"font-light-italic text-2xl",children:["\xa0(",null===(a=e.departmentExtra)||void 0===a?void 0:a.extraLabelText,")"]})]})},"department-"+t)})]}),v&&(0,n.jsxs)("div",{className:"font-bold text-xl",children:["Viser: ",v.name]})]}):null,(0,n.jsx)("div",{className:"md:flex md:flex-wrap max-w-content m-auto",children:l.map((e,t)=>(0,n.jsx)("div",{className:"w-full md:w-1/".concat(h," p-4 ").concat(v&&!e.departments.nodes.some(e=>e.slug===v.slug)?"hidden":null),children:(0,n.jsx)(s.Z,{person:e,showDepartment:d,showBio:m,imageAspectRatio:u,design:f})},"person-".concat(t)))})]})}},7036:function(e,t,l){l.d(t,{Z:function(){return c}});var n=l(5893),a=l(9755),i=l.n(a);function c(e){let{image:t,imageClassName:l,wrapperClassName:a,figureClassName:c,showCaption:s=!1,captionClassName:o,priority:r=!1,imageAltBackup:d="",unoptimized:m=!1,size:u="full",objectFit:x="cover"}=e;if(!t)return null;{let e="";if("full"!==u){var h,f,v=null===(f=t.mediaDetails)||void 0===f?void 0:null===(h=f.sizes)||void 0===h?void 0:h.find(e=>e.name===u);e=v?v.sourceUrl:(null==t?void 0:t.sourceUrl)?null==t?void 0:t.sourceUrl:""}else e=(null==t?void 0:t.sourceUrl)?null==t?void 0:t.sourceUrl:"";let p=(null==t?void 0:t.altText)?null==t?void 0:t.altText:d;return(0,n.jsxs)("figure",{className:"relative ".concat(c||""),children:[(0,n.jsx)("div",{className:"relative overflow-hidden ".concat(a||""),children:(null==t?void 0:t.sourceUrl)?(0,n.jsx)(i(),{unoptimized:m,priority:r,className:"".concat(l||""),alt:p,src:e,layout:"fill",objectFit:x,objectPosition:"center"}):""}),s&&(null==t?void 0:t.caption)&&(0,n.jsx)("figcaption",{className:o||"",dangerouslySetInnerHTML:{__html:null==t?void 0:t.caption}})]})}}},4838:function(e,t,l){l.d(t,{Z:function(){return a}});var n=l(5893);function a(e){let{level:t,className:l}=e,a=t?t.toLowerCase():"",i=["h1","h2","h3","h4","h5","h6"].includes(a)?a:"p";return(0,n.jsx)(i,{className:"heading heading-".concat(a," ")+l,children:e.children})}},415:function(e,t,l){l.d(t,{Z:function(){return i}});var n=l(5893),a=l(7036);function i(e){var t;let{person:l,showDepartment:i,showBio:c,imageAspectRatio:s,design:o="default"}=e,r="";return i&&l.departments.nodes.map(e=>{r+=""==r?e.name:", "+e.name}),(0,n.jsxs)("div",{className:"text-lg ".concat("default"==o?"text-theme-text-inv":"text-theme-text"),children:[l.featuredImage&&(0,n.jsx)(a.Z,{image:null===(t=l.featuredImage)||void 0===t?void 0:t.node,wrapperClassName:"rounded-3xl ".concat("square"==s?"aspect-square":"aspect-4/3"),imageAltBackup:l.title,size:"medium"}),(0,n.jsx)("div",{className:"font-bold text-3xl mt-4",children:l.title}),(0,n.jsx)("div",{className:"font-italic mb-1",children:l.contactinfo.position}),i&&(0,n.jsx)("div",{className:"text-sm mb-1",children:r}),l.contactinfo.phone&&(0,n.jsx)("div",{children:(0,n.jsx)("a",{className:"fancyphone",href:"tel:".concat(l.contactinfo.phone.replaceAll(" ","")),children:l.contactinfo.phone})}),l.contactinfo.email&&(0,n.jsx)("div",{children:(0,n.jsx)("a",{className:"fancylink",href:"mailto:".concat(l.contactinfo.email),children:l.contactinfo.email})}),c&&(0,n.jsx)("div",{className:"text-md mt-4 mb-1",children:l.contactinfo.bio})]})}}}]);