"use strict";(self.__LOADABLE_LOADED_CHUNKS__=self.__LOADABLE_LOADED_CHUNKS__||[]).push([[5427,7808],{37808:(e,n,t)=>{t.d(n,{$n:()=>_,Ay:()=>_,C3:()=>b,fd:()=>N});var a=t(58168),c=t(89379),s=t(80045),l=t(73620),i=t(96540),o=t(32485),r=t.n(o),u=t(81639),d=t(3959),m=t(88460),f=t(28596);const h="andes-button",A=["children","className","disabled","fullWidth","hierarchy","href","id","innerRef","isFetching","isFetchingComplete","loading","onClick","size","spinner","spinnerLabel","srAnnouncement","srLabel","type"],p={small:"xsmall",medium:"xsmall",large:"small"},b=e=>{let{children:n}=e;return(0,l.A)("span",{className:"".concat(h,"__text")},void 0,n)},_=function(){const e=(0,i.forwardRef)(((e,n)=>{const{children:t,className:o,disabled:b=!1,fullWidth:_=!1,hierarchy:g="loud",href:y,id:L,innerRef:E,isFetching:N,isFetchingComplete:v,loading:x,onClick:C,size:F="large",spinner:B,spinnerLabel:D,srAnnouncement:R,srLabel:k,type:z="button"}=e,S=(0,s.A)(e,A),w=(0,f.Bi)(L),O=x||N,T=(0,i.useRef)(),$=(0,i.useRef)(!0),[j,W]=(0,i.useState)(""),[H,K]=(0,i.useState)(!1);(0,i.useEffect)((()=>{O||(W(""),$.current||K(!0)),$&&($.current=!1)}),[O]),(0,i.useEffect)((()=>{let e;return H&&(e=setTimeout((()=>{K(!1)}),200)),()=>clearTimeout(e)}),[H]),(0,i.useEffect)((()=>()=>{clearTimeout(T.current)}),[]),(0,m.A)(!O||O&&(R||D)," needs some plain text contents for accessibility reasons.\n Please add a 'srAnnouncement' prop.");const P=r()(h,o,{["".concat(h,"--").concat(F)]:F,["".concat(h,"--").concat(g)]:g,["".concat(h,"--disabled")]:b,["".concat(h,"--full-width")]:_,["".concat(h,"--loading")]:O,["".concat(h,"--loading-complete")]:H}),U=(0,c.A)({className:P,id:w,"aria-label":k},S),q=(0,l.A)("span",{className:"".concat(h,"__content")},void 0,t);if(y){const e=(0,c.A)((0,c.A)({},b||O?{role:"link","aria-disabled":!0}:{href:y}),{},{ref:n||E,onClick:C},U);return i.createElement("a",e,q)}const G=(0,c.A)({disabled:b||O,ref:n||E,type:z},U),I=p[F];return i.createElement(i.Fragment,null,i.createElement("button",(0,a.A)({},G,{onClick:e=>{const n=R||D||"";T.current=setTimeout((()=>W(n)),30),"function"==typeof C&&C(e)}}),q,O&&(0,l.A)(u.A,{size:I,color:"loud"===g?"white":"blue"})),O&&(0,l.A)(d.s6,{"aria-live":"assertive"},void 0,j))}));return e.displayName="Button",e}();const g=/^(2943|5081)$/.test(t.j)?["behavior","className","hierarchy","icon","size","srLabel","text"]:null,y="loud",L="andes-button",E=/^(2943|5081)$/.test(t.j)?function(){const e=(0,i.forwardRef)(((e,n)=>{const{behavior:t="expanded",className:c,hierarchy:o=y,icon:u,size:d="large",srLabel:f,text:h}=e,A=(0,s.A)(e,g);(0,m.A)(h||f," needs some plain text contents for accessibility reasons.\n Please add an 'srLabel' or 'text' prop.");const p=r()("".concat(L,"--fab"),"".concat(L,"--").concat(t),c,{["".concat(L,"--").concat(d)]:d}),E=i.createElement(i.Fragment,null,(0,l.A)("span",{className:"".concat(L,"--icon-container")},void 0,(0,i.cloneElement)(u,{"aria-hidden":!0})),h&&(0,l.A)(b,{},void 0,h));return i.createElement(_,(0,a.A)({},A,{hierarchy:o,className:p,srLabel:f||h,ref:n}),E)}));return e.displayName="FloatingActionButton",e}():null;var N=/^(2943|5081)$/.test(t.j)?E:null}}]); //# sourceMappingURL=7808.afc90488.js.map