import { h } from './chunks/d4789960.js';
import './chunks/456564be.js';
import { u as useProp } from './chunks/c26036df.js';
import { u as useEvent } from './chunks/d4058887.js';
import './chunks/4ccc6eeb.js';
import { g as getComponentOrDefine } from './chunks/071ed725.js';
import './chunks/23e44913.js';
import './chunks/d76d6172.js';
import './kun-icon.js';

var style = ".needle-button {\n  cursor: pointer;\n  padding: 0 16px;\n  color:rgba(156,156,156,1);\n  height:49px;\n  outline: none;\n  line-height: 49px;\n  background:rgba(255,255,255,1);\n  border-radius:5px;\n  border:1px solid rgba(233,233,233,1);\n}\n\n.needle-button > kun-icon {\n  margin-right: 10px;\n}\n\n.inline-flex {\n  display: inline-flex;\n}\n\n.items-center {\n  align-items: center;\n}\n\n.button-normal {\n  border-color: orange;\n}\n\n.button-normal {\n  color: orange;\n}\n";

const KunButtonPuer = () => {
  const [loading] = useProp("loading");
  const [type] = useProp("type");
  const [needleContent] = useProp("needleContent");
  const myClick = useEvent("MyClick", {
    bubbles: true,
    composed: true
  });

  const onClick = () => {
    if (!loading) {
      myClick({});
    }
  };

  return h("host", null, h("style", null, style), h("button", {
    type: "button",
    onclick: onClick,
    className: `hover:text-orange-500 inline-flex text-sm items-center needle-button ${type === "normal" ? "button-normal" : ""} `
  }, loading && h("kun-icon", {
    iconType: "loading",
    iconWidth: 18,
    iconHeight: 18
  }), needleContent));
};

KunButtonPuer.props = {
  type: {
    type: String
  },
  loading: {
    type: Boolean,
    value: false,
    reflect: true
  },
  needleContent: {
    type: String,
    value: "确定",
    reflect: true,
    event: {
      type: "changeMessage"
    }
  }
};
var kunButtonPuer = getComponentOrDefine("kun-button-puer", KunButtonPuer);

export default kunButtonPuer;
//# sourceMappingURL=kun-button-puer.js.map
