1import{i as m}from"./apollo-B1TfImlk.js";import{j as d}from"./jsx-runtime-DdoI48LW.js";import{d as y}from"./Spinner-DYEngc7-.js";import{s as x,P as B,k as z}from"./index-B1RRkv1R-Bv7-lF9O.js";const{useState:T,useEffect:j}=await m("react"),$=()=>{const{innerWidth:r,innerHeight:t}=window;return{width:r,height:t}},L=()=>{const[r,t]=T($());return j(()=>{function i(){t($())}return window.addEventListener("resize",i),()=>window.removeEventListener("resize",i)},[]),r},N=await m("styled-components"),E=N.button(({$isLoading:r,$marginBottom:t,$marginTop:i,$size:s,$variant:o,$width:l,$outline:a,theme:c})=>{const{breakpoints:n,buttons:{buttonBase:b,buttonSizes:u,buttonStates:e}}=c[x],p=L(),g=B(n,p,l);return{display:"grid",gridTemplateColumns:"100%",gridTemplateRows:"100%",placeItems:"center",gap:"0.5rem",cursor:"pointer",marginTop:`${i||0}px`,marginBottom:`${t||0}px`,width:g,...b,...u[s],div:{gridColumn:"1",gridRow:"1"},"div.loading":{opacity:`${r?1:0}`},"div.content":{opacity:`${r?0:1}`},"&:enabled":{...o==="secondary"&&a?{color:e.enabled[o].backgroundColor,border:`2px solid ${e.enabled[o].backgroundColor}`,backgroundColor:"transparent"}:e.enabled[o],svg:{path:{fill:a?e.enabled[o].backgroundColor:e.enabled[o].color}},p:{color:e.enabled[o].color}},"&:disabled":{...o==="secondary"&&a?{color:`rgba(${e.disabled[o].backgroundColor}, ${e.disabled[o].opacity})`,border:`20px solid rgba(${e.disabled[o].backgroundColor}, ${e.disabled[o].opacity})`,outlineOffset:"-1px",backgroundColor:"transparent"}:e.disabled[o],cursor:"default",pointerEvents:"none",svg:{path:{fill:e.disabled[o].color}}},"&:hover":{...o==="secondary"&&a?{color:e.hover[o].backgroundColor,border:`2px solid ${e.hover[o].backgroundColor}`,backgroundColor:e.hover[o].color}:e.hover[o],svg:{path:{fill:a?e.hover[o].backgroundColor:e.hover[o].color}},p:{color:e.hover[o].color}},"&:focus, &:active":{...o==="secondary"&&a?{color:e.active[o].backgroundColor,border:`2px solid ${e.active[o].backgroundColor}`,backgroundColor:e.hover[o].color}:e.active[o],svg:{path:{fill:e.active[o].color}},p:{color:e.active[o].color}}}}),{forwardRef:R}=await m("react"),S=R(({ariaLabel:r,buttonType:t="button",children:i,className:s,"data-testid":o,href:l,id:a,isDisabled:c,isLoading:n,marginBottom:b,marginTop:u,onBlur:e,onClick:p,onFocus:g,size:h="medium",style:f,variant:v="primary",width:k="fixed",outline:C},w)=>d.jsxs(E,{"aria-label":r,as:z(l),className:s,"data-testid":o,disabled:c,id:a,$isLoading:n,$marginBottom:b,$marginTop:u,onBlur:e,onClick:p,onFocus:g,ref:w,$size:h,style:f,type:t,$variant:v,$width:k,$outline:C,children:[d.jsx("div",{className:"content",children:i}),n&&d.jsx("div",{className:"loading",children:d.jsx(y,{isWhite:v==="primary",size:h==="hero"?32:24})})]}));S.displayName="Button";export{S as R};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.