import{__assign as e}from"../../../node_modules/tslib/tslib.es6.js";import t from"react";import{DEFAULT_BLOC_PROPERTIES as r}from"../../Bloc/BlocProperties.js";import{SupportedLanguages as o}from"../../Bloc/BlocTypes.js";import{PropsGeneratorForGivenComponent as n}from"../../../prop-utils.js";import{Button as a}from"../../../node_modules/@chakra-ui/button/dist/esm/button.js";var l,s,i=e(e({},r),{color:"",url:"",text:"",withOutline:"false",buttonSize:"md"}),m=(s=n({text:(l={},l[o.English]="",l[o.Thai]="",l)},["text"],[])).propsGenerator,c=s.propsParser;export default function(e){var r,o,n=e.color,l=e.url,s=e.text,i=e.withOutline,m=e.buttonSize;return"red"===n?(r="red",o=!0):"grey"===n?(r="btn-secondary",o=!0):"blue"===n?(r="blue",o=!0):"primary"===n?(r="primary",o=!1):"secondary"===n?(r="secondary",o=!1):""===n&&(o=!0),t.createElement(t.Fragment,null,t.createElement("a",{href:l,rel:"noreferrer",target:l.startsWith("/")?"_self":"_blank"},t.createElement(a,{className:"button-link "+r+" "+("false"===i?"":"outline"),size:convertLegacyButtonSizeToChakraUI(m)},t.createElement("span",{className:o?"text chevron right":"text"},s))),t.createElement("style",{jsx:!0},"\n        @media (max-width: 600px) {\n          .text {\n            text-align: center;\n            white-space: normal;\n          }\n        }\n      "))}export{i as DEFAULT_BUTTON_LINK,m as buttonLinkPropsGenerator,c as buttonLinkPropsParser};
//# sourceMappingURL=ButtonLink.js.map
