import { av as b, f1 as h, cU as m, X as s, P as g, S as p, bI as f, eh as S, d1 as w, O as u, a as x, N as y, Z as C, d4 as F, F as o, fm as V, at as v, a6 as a, bU as P, G as r, a7 as l, a8 as n, Y as I, el as M, af as d, bJ as k, a9 as E, dB as R, em as D, cP as B, cQ as T, cR as U, f3 as W } from "./603b75d9.js";
import { PaddingControl as z } from "./d50792b8.js";
import { MarginControl as A } from "./f64a8554.js";
import { useContext as c } from "react";
import { SelectInputValidationChildren as L, SelectInputValidationSection as O } from "./00d44232.js";
import { formDataChildren as N, FormDataPropertyView as j } from "./f9847c56.js";
import "react-dom";
const H = (e) => b`
    &.ant-select .ant-select-selector,
    &.ant-select-multiple .ant-select-selection-item {
      border-radius: ${e.radius};
      padding: ${e.padding};	
      height: auto;	
    }	
    .ant-select-selection-search {	
      padding: ${e.padding};
    }	
    .ant-select-selection-search-input,
    .ant-select-selection-item,
    .ant-select-selection-item .option-label {
      font-family:${e.fontFamily} !important;
      text-transform:${e.textTransform} !important;
      text-decoration:${e.textDecoration} !important;
      font-size:${e.textSize} !important;
      font-weight:${e.textWeight};
      color:${e.text} !important;
      font-style:${e.fontStyle};
    }
    .ant-select-selector::after,	
    .ant-select-selection-placeholder,	
    .ant-select-selection-item {	
      line-height: 1.5715 !important;
    }

    &.ant-select:not(.ant-select-disabled) {
      color: ${e.text};
      .ant-select-selection-placeholder,
      .ant-select-selection-item {
        line-height: 1.5715 !important;
      }
      .ant-select-selection-placeholder,
      &.ant-select-single.ant-select-open .ant-select-selection-item {
        color: ${e.text};
        opacity: 0.4;
        width: 100%;
      }

      .ant-select-selector {
        background: ${e.background};
        border-color: ${e.border};
        border-width:${e.borderWidth};
        box-shadow:${e.boxShadow} ${e.boxShadowColor};
      }

      &.ant-select-focused,
      &:hover {
        .ant-select-selector {
          border-color: ${e.accent} !important;
        }
      }

      .ant-select-arrow,
      .ant-select-clear {
        // background: ${e.background};
        color: ${e.text === "#222222" ? "#8B8FA3" : h(e.text) ? m(e.text, 0.2) : e.text};
      }

      .ant-select-clear:hover {
        color: ${e.text === "#222222" ? "#8B8FA3" : h(e.text) ? m(e.text, 0.1) : e.text};
      }

      &.ant-select-multiple .ant-select-selection-item {
        border: none;
        background: ${e.tags};
        color: ${e.tagsText};
        border-radius: ${e.radius};

        .ant-select-selection-item-remove {
          color: ${e.tagsText};
          opacity: 0.5;
        }
      }
    }
  `, $ = s(W)`
  width: 100%;
  ${(e) => e.$inputFieldStyle && H(e.$inputFieldStyle)}
`, G = s.div`
    background: ${(e) => {
  var t;
  return (t = e.$style) == null ? void 0 : t.background;
}};
    border: ${(e) => {
  var t;
  return (t = e.$style) == null ? void 0 : t.border;
}};
    border-style: ${(e) => {
  var t;
  return (t = e.$style) == null ? void 0 : t.borderStyle;
}};
    border-width: ${(e) => {
  var t;
  return (t = e.$style) == null ? void 0 : t.borderWidth;
}};
    border-radius: ${(e) => {
  var t;
  return (t = e.$style) == null ? void 0 : t.radius;
}};
    rotate: ${(e) => {
  var t;
  return (t = e.$style) == null ? void 0 : t.rotation;
}};
    margin: ${(e) => {
  var t;
  return (t = e.$style) == null ? void 0 : t.margin;
}};
    padding: ${(e) => {
  var t;
  return (t = e.$style) == null ? void 0 : t.padding;
}};
  .ant-select-item-option-content {
    font-size: ${(e) => {
  var t;
  return (t = e.$style) == null ? void 0 : t.textSize;
}};
    font-style: ${(e) => {
  var t;
  return (t = e.$style) == null ? void 0 : t.fontStyle;
}};
    font-family: ${(e) => {
  var t;
  return (t = e.$style) == null ? void 0 : t.fontFamily;
}};
    font-weight: ${(e) => {
  var t;
  return (t = e.$style) == null ? void 0 : t.textWeight;
}};
    text-transform: ${(e) => {
  var t;
  return (t = e.$style) == null ? void 0 : t.textTransform;
}};
    color: ${(e) => {
  var t;
  return (t = e.$style) == null ? void 0 : t.text;
}};
    line-height: ${(e) => {
  var t;
  return (t = e.$style) == null ? void 0 : t.lineHeight;
}};
  }
  .option-label{
    text-decoration: ${(e) => {
  var t;
  return (t = e.$style) == null ? void 0 : t.textDecoration;
}} !important;
  }
  .option-label img {
    min-width: 14px;
    margin-right: 0;
  }
`, J = s.span`
  display: inline-flex;
  align-items: center;
  gap: 6px;

  img {
    margin-right: -6px;
  }
`, ee = {
  label: g,
  placeholder: p,
  disabled: f,
  onEvent: S,
  options: w,
  allowClear: u,
  inputValue: x(""),
  // user's input value when search
  showSearch: u.DEFAULT_TRUE,
  viewRef: y,
  margin: A,
  padding: z,
  inputFieldStyle: C(F),
  ...L,
  ...N
}, te = (e) => /* @__PURE__ */ o($, {
  ref: e.viewRef,
  autoFocus: e.autoFocus,
  mode: e.mode,
  $inputFieldStyle: e.inputFieldStyle,
  $style: e.style,
  disabled: e.disabled,
  allowClear: e.allowClear,
  placeholder: e.placeholder,
  value: e.value,
  showSearch: e.showSearch,
  filterOption: (t, i) => i == null ? void 0 : i.label.toLowerCase().includes(t.toLowerCase()),
  dropdownRender: (t) => /* @__PURE__ */ o(G, {
    $style: e.childrenInputFieldStyle,
    children: t
  }),
  dropdownStyle: {
    padding: 0
  },
  menuItemSelectedIcon: e.mode ? /* @__PURE__ */ o(V, {
    title: ""
  }) : "",
  onChange: e.onChange,
  onFocus: () => e.onEvent("focus"),
  onBlur: () => e.onEvent("blur"),
  onSearch: e.showSearch ? (t) => {
    e.dispatch(v("inputValue", t, !1));
  } : void 0,
  children: e.options.filter((t) => t.value !== void 0 && !t.hidden).map((t) => /* @__PURE__ */ o($.Option, {
    value: t.value,
    label: t.label,
    disabled: t.disabled,
    children: /* @__PURE__ */ a(J, {
      className: "option-label",
      children: [e.options.findIndex((i) => P(i.prefixIcon)) > -1 && t.prefixIcon, /* @__PURE__ */ o("span", {
        children: t.label
      })]
    })
  }, t.value))
}), oe = (e) => /* @__PURE__ */ a(r, {
  children: [/* @__PURE__ */ a(l, {
    name: n.basic,
    children: [e.options.propertyView({}), e.defaultValue.propertyView({
      label: I("prop.defaultValue")
    }), M(e)]
  }), ["logic", "both"].includes(c(d).editorModeStatus) && /* @__PURE__ */ a(r, {
    children: [/* @__PURE__ */ a(r, {
      children: [/* @__PURE__ */ o(O, {
        ...e
      }), /* @__PURE__ */ o(j, {
        ...e
      })]
    }), /* @__PURE__ */ a(l, {
      name: n.interaction,
      children: [e.onEvent.getPropertyView(), k(e), E(e)]
    })]
  }), ["layout", "both"].includes(c(d).editorModeStatus) && e.label.getPropertyView(), ["logic", "both"].includes(c(d).editorModeStatus) && /* @__PURE__ */ a(l, {
    name: n.advanced,
    children: [R(e), D(e)]
  }), ["layout", "both"].includes(c(d).editorModeStatus) && /* @__PURE__ */ a(r, {
    children: [/* @__PURE__ */ o(l, {
      name: n.style,
      children: e.style.getPropertyView()
    }), /* @__PURE__ */ o(l, {
      name: n.labelStyle,
      children: e.labelStyle.getPropertyView()
    }), /* @__PURE__ */ o(l, {
      name: n.inputFieldStyle,
      children: e.inputFieldStyle.getPropertyView()
    }), /* @__PURE__ */ o(l, {
      name: n.childrenInputFieldStyle,
      children: e.childrenInputFieldStyle.getPropertyView()
    })]
  })]
}), ae = B([T, U]);
export {
  ee as SelectChildrenMap,
  oe as SelectPropertyView,
  te as SelectUIView,
  ae as baseSelectRefMethods,
  H as getStyle
};
