"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var i=require("styled-components"),t=require("./utils.js"),u=require("../../utils/index.js");function s(o){return o&&o.__esModule?o:{default:o}}var a=s(i);const d=a.default.button`
  display: flex;
  align-items: center;
  justify-content: center;
`;a.default(d).withConfig({shouldForwardProp:u.convertToTransientProps(["isLoading"])})`
  ${({size:o})=>t.getSVGSize(o)}
`;const c=a.default.button.withConfig({shouldForwardProp:u.convertToTransientProps(["isLoading","hasFocus"])})`
  display: flex;
  align-items: center;
  justify-content: center;
  height: ${({size:o})=>t.getIconButtonSize(o)};
  width: ${({size:o})=>t.getIconButtonSize(o)};
  border-radius: ${({theme:o})=>o.radius.roundedE};
  background-color: ${({variant:o,isLoading:e,theme:r})=>e?t.getIconButtonBackgroundColorLoading(o,r.mode==="dark"):t.getIconButtonBackgroundColor(o)};
  border: 1px solid
    ${o=>o.variant==="outline"?u.getColorAlias("borderStrong",o.theme):"transparent"};
  ${({disabled:o,variant:e,isLoading:r})=>o&&!r&&i.css`
        background-color: ${t.getDisabledBackgroundColor(e)};
      `}
  &:hover {
    cursor: ${({isLoading:o})=>o?"wait":"pointer"};
    background: ${({isLoading:o,disabled:e,variant:r,theme:n})=>!o&&!e&&t.getHoverIconButtonBackground(r,n.mode==="dark")};
  }
  &:active {
    background: ${({isLoading:o,disabled:e,variant:r,theme:n})=>!o&&!e&&t.getActiveIconButtonBackground(r,n.mode==="dark")};
  }
  svg {
    ${({size:o,variant:e,disabled:r,isLoading:n})=>i.css`
        ${t.getSVGSize(o)};
        fill: ${n?t.getSpinnerType(e):t.getIconButtonSvgColor(e,r)};
      `}
  }
  &:disabled:hover {
    cursor: not-allowed;
  }
  &:focus,
  &:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px ${u.getColorAlias("focusOuter")};
  }
  ${u.getDefaultTransition()};
`;exports.FlexButton=d;exports.IconButtonContainer=c;
