import { fP as n, fQ as a, aC as c, a3 as d, a5 as i, fR as s, c3 as t, d6 as g, dA as l, d8 as p, dB as u, c8 as $ } from "./56c67d3b.js";
import "react";
import "react-dom";
function b(o) {
  const r = n(o.background), e = a(o.background);
  return c`
    &&& {
      border-radius: ${o.radius};
      margin: ${o.margin};
      padding: ${o.padding};
      &:not(:disabled) {
        // click animation color
        --antd-wave-shadow-color: ${o.border};
        border-color: ${o.border};
        color: ${o.text};
        background: ${o.background};
        border-radius: ${o.radius};
        margin: ${o.margin};
        padding: ${o.padding};

        &:hover,
        &:focus {
          color: ${o.text};
          background-color: ${r};
          border-color: ${o.border === o.background ? r : o.border};
        }

        &:active {
          color: ${o.text};
          background-color: ${e};
          border-color: ${o.border === o.background ? e : o.border};
        }
      }
    }
  `;
}
const C = d($)`
  ${(o) => o.$buttonStyle && b(o.$buttonStyle)}
  width: 100%;
  height: auto;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  span {
    overflow: hidden;
    text-overflow: ellipsis;
  }
  gap: 6px;
`, w = d.div`
  // The button component is disabled but can respond to drag & select events
  ${(o) => o.disabled && `
    cursor: not-allowed;
    button:disabled {
      pointer-events: none;
    }
  `};
`;
function f(o) {
  return o && (o.hasOwnProperty("backgroundColor") || o.hasOwnProperty("borderColor") || o.hasOwnProperty("color")) ? {
    background: o.backgroundColor,
    border: o.borderColor,
    text: o.color
  } : o;
}
const h = i(s), x = t(h, f), B = g([l, p, u]);
export {
  C as Button100,
  w as ButtonCompWrapper,
  x as ButtonStyleControl,
  B as buttonRefMethods,
  b as getButtonStyle
};
