import { e_ as n, e$ as i, av as a, X as d, Z as s, f0 as c, bS as t, cP as g, d8 as $, cR as f, d9 as p, bV as h } from "./603b75d9.js";
import "react";
import "react-dom";
function l(r) {
  const o = r.background && n(r.background), e = r.background && i(r.background);
  return a`
    &&& {
      border-radius: ${r.radius};
      border-width:${r.borderWidth};
      margin: ${r.margin};
      padding: ${r.padding};
      rotate: ${r.rotation && r.rotation};
      &:not(:disabled) {
        --antd-wave-shadow-color: ${r.border};
        border-color: ${r.border};
        color: ${r.text};
        font-size: ${r.textSize};
        font-weight: ${r.textWeight};
        font-family: ${r.fontFamily};
        font-style: ${r.fontStyle};
        text-transform:${r.textTransform};
        text-decoration:${r.textDecoration};
        background: ${r.background};
        border-radius: ${r.radius};
        margin: ${r.margin};
        padding: ${r.padding};

        &:hover,
        &:focus {
          color: ${r.text};
          background-color: ${o};
          border-color: ${r.border === r.background ? o : r.border} !important;
        }
        &:active {
          color: ${r.text};
          background-color: ${e};
          border-color: ${r.border === r.background ? e : r.border} !important;
        }
      }
    }
  `;
}
const u = d(h)`
  ${(r) => r.$buttonStyle && l(r.$buttonStyle)}
  width: 100%;
  height: auto;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  gap: 6px; 
  span {
    overflow: hidden;
    text-overflow: ellipsis;
  }
  line-height:${(r) => {
  var o;
  return (o = r.$buttonStyle) == null ? void 0 : o.lineHeight;
}}; 
`, w = d.div`
  display: flex;

  // The button component is disabled but can respond to drag & select events
  ${(r) => r.$disabled && `
    cursor: not-allowed;
    button:disabled {
      pointer-events: none;
    }
  `};
`;
function m(r) {
  return r && (r.hasOwnProperty("backgroundColor") || r.hasOwnProperty("borderColor") || r.hasOwnProperty("color")) ? {
    background: r.backgroundColor,
    border: r.borderColor,
    text: r.color
  } : r;
}
const x = s(c, "style"), C = t(x, m), B = g([$, f, p]);
export {
  u as Button100,
  w as ButtonCompWrapper,
  C as ButtonStyleControl,
  B as buttonRefMethods,
  l as getButtonStyle
};
