import{j as e,r as f}from"./iframe-p4aYZyoq.js";import{S as x}from"./swissprot-C2okrj8H.js";import{c as g}from"./index-Dx18ixSn.js";/* empty css               */import{D as _}from"./dropdown-button-D0tG_Xmy.js";import{E as j}from"./external-link-EhlwmH51.js";import{B as d}from"./button-BsNF7f-b.js";import{S as v}from"./help-BLfYd5wX.js";import{S as k,a as y}from"./envelope-DeyM1Y-e.js";import{M as w}from"./main-search-CqcjHZl0.js";import"./preload-helper-BDBacUwf.js";/* empty css                 */import"./utils-pBtDpbI-.js";import"./external-link-DPagDcN8.js";const S=({search:r,secondaryItems:a,subtext:t,isNegative:s=!1,className:n,homepageLink:o,children:l,...u})=>e.jsxs("div",{className:g(n,"header",{"header--negative":s}),...u,children:[e.jsx("div",{className:"header__link",children:o}),e.jsx("div",{className:"header__navigation",children:l}),e.jsx("div",{className:"header__search",children:r}),(a||t)&&e.jsxs("div",{className:"header__secondary",children:[a&&e.jsx("div",{className:"header__navigation",children:a}),t&&e.jsx("small",{children:t})]})]});try{header.displayName="header",header.__docgenInfo={description:"",displayName:"header",props:{homepageLink:{defaultValue:null,description:"Component to display where the link to the home page will be",name:"homepageLink",required:!1,type:{name:"ReactNode"}},search:{defaultValue:null,description:"Search component",name:"search",required:!1,type:{name:"ReactNode"}},secondaryItems:{defaultValue:null,description:"Secondary items",name:"secondaryItems",required:!1,type:{name:"ReactNode"}},subtext:{defaultValue:null,description:"Subtext",name:"subtext",required:!1,type:{name:"ReactNode"}},isNegative:{defaultValue:{value:"false"},description:'Flag representing if the header should be in a "negative" style',name:"isNegative",required:!1,type:{name:"boolean"}}}}}catch{}const{fn:c}=__STORYBOOK_MODULE_TEST__,b=e.jsxs(e.Fragment,{children:[e.jsx("a",{target:"_blank",href:"https://uniprot.org/",rel:"noreferrer",children:e.jsx(v,{width:"1.8ch"})}),e.jsx("a",{target:"_blank",href:"https://uniprot.org/",rel:"noreferrer",children:e.jsx(k,{width:"2ch"})}),e.jsx("a",{target:"_blank",href:"https://uniprot.org/",rel:"noreferrer",children:e.jsx(y,{width:"2ch"})})]}),N=({onSubmit:r})=>{const[a,t]=f.useState("");return e.jsx(w,{onTextChange:t,searchTerm:a,onSubmit:s=>{s.preventDefault(),r==null||r(s)}})},K={title:"Layout/Header",args:{search:!0,secondaryItems:!0,isNegative:!0,subtext:!0,onClick:c(),onSubmit:c()},render:({search:r,secondaryItems:a,isNegative:t,subtext:s,onClick:n,onSubmit:o})=>e.jsxs(S,{homepageLink:e.jsx("a",{href:"https://www.uniprot.org",children:e.jsx(x,{width:30})}),search:r&&e.jsx(N,{onSubmit:o}),secondaryItems:a&&b,subtext:s&&"Release info | Statistics",isNegative:t,children:[e.jsx("a",{target:"_blank",href:"https://www.uniprot.org/",rel:"noreferrer",children:"Link 1"}),e.jsx(_,{visibleElement:l=>e.jsx(d,{variant:"tertiary",onClick:l,children:"Links 2"}),children:e.jsxs("div",{style:{display:"flex",flexDirection:"column"},children:[e.jsx("a",{target:"_blank",href:"https://uniprot.org/",rel:"noreferrer",children:"sublink 1"}),e.jsx("a",{target:"_blank",href:"https://uniprot.org/",rel:"noreferrer",children:"sublink 2"}),e.jsx("a",{target:"_blank",href:"https://uniprot.org/",rel:"noreferrer",children:"sublink 3"}),e.jsx(j,{url:"//www.uniprot.org",children:"external link"}),e.jsx(d,{variant:"tertiary",onClick:n,children:"action"})]})}),e.jsx("a",{target:"_blank",href:"https://uniprot.org/",rel:"noreferrer",children:"Link 3"}),e.jsx(d,{variant:"tertiary",onClick:n,children:"action"})]})},i={};var h,p,m;i.parameters={...i.parameters,docs:{...(h=i.parameters)==null?void 0:h.docs,source:{originalSource:"{}",...(m=(p=i.parameters)==null?void 0:p.docs)==null?void 0:m.source}}};const U=["Header"];export{i as Header,U as __namedExportsOrder,K as default};
