import { f2 as d, f3 as c, co as i, b9 as n, bB as a, ez as s, bA as t, cG as g, bE as l } from "./684d2f28.js";
import "react";
import { focusWithOptions as p, blurMethod as b, clickMethod as u } from "./d6402597.js";
import "react-dom";
function $(o) {
  const r = d(o.background), e = c(o.background);
  return i`
    &&& {
      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-color: ${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 w = n(l)`
  ${(o) => o.$buttonStyle && $(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;
`, x = n.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 = a(s), B = t(h, f), O = g([p, b, u]);
export {
  w as Button100,
  x as ButtonCompWrapper,
  B as ButtonStyleControl,
  O as buttonRefMethods,
  $ as getButtonStyle
};
