import e from"react";import{Button as r,Loader as a}from"../../node_modules/@cortexapps/react-plugin-ui/dist/index.js";import t from"../../node_modules/classnames/index.js";const n=e=>{switch(e){case"primary":default:return"default";case"danger":return"destructive";case"secondary":return"secondary"}},l=e=>{switch(e){case"sm":return"xs";case"md":default:return"default";case"lg":return"lg"}},i=e.forwardRef((({align:i="center",children:s,color:c="primary",disabled:d,external:o,href:m,icon:u,id:f,legacyColor:p,loading:g,nowrap:y=!0,onClick:h,size:x="md",tight:k,block:b,outline:w,type:C,...E},v)=>{const z=t({"text-nowrap":y});return m?e.createElement(r,{asChild:!0,ref:v,id:f,disabled:d,type:C,onClick:h,variant:"link",size:"inline",className:z,...E},e.createElement("a",{href:m,target:o?"_blank":void 0},s)):e.createElement(r,{ref:v,id:f,disabled:d,type:C,onClick:h,className:z,variant:n(c),size:l(x),...E},g&&e.createElement(a,null),!g&&u&&e.createElement(u,null),s)}));export{i as default};
//# sourceMappingURL=Button.js.map
