import { ha as s, gV as o, bb as a, a0 as t, V as e, P as l, w as d, fE as n, hb as p, hc as h, hd as c, he as g, hf as u } from "./684d2f28.js";
import "react";
import "react-dom";
const w = class extends s({
  field: o,
  order: a([{
    label: t("googleSheets.ASC"),
    value: "ASC"
  }, {
    label: t("googleSheets.DESC"),
    value: "DESC"
  }], "ASC")
}) {
  propertyView() {
    return /* @__PURE__ */ e("div", {
      style: {
        display: "flex",
        flexGrow: 1,
        gap: "8px"
      },
      children: /* @__PURE__ */ l("div", {
        style: {
          width: "184px",
          flexGrow: 1,
          display: "flex",
          gap: "8px"
        },
        children: [this.children.field.propertyView({
          placeholder: t("googleSheets.sortPlaceholder")
        }), /* @__PURE__ */ e("div", {
          style: {
            flexShrink: 0,
            width: "30%"
          },
          children: this.children.order.propertyView({})
        })]
      })
    });
  }
}, f = class extends n(w) {
  getView() {
    return super.getView().reduce((r, i) => ({
      ...r,
      ...i.children.field.getView()
    }), {});
  }
  getPropertyView() {
    return /* @__PURE__ */ l(p, {
      children: [/* @__PURE__ */ e(h, {
        children: t("googleSheets.sort")
      }), /* @__PURE__ */ e(c, {
        children: /* @__PURE__ */ e(g, {
          placement: "bottom",
          children: /* @__PURE__ */ e(u, {
            list: super.getView().map((r) => r.propertyView()),
            onAdd: () => this.dispatch(this.pushAction({})),
            onDelete: (r, i) => this.dispatch(this.deleteAction(i))
          })
        })
      })]
    });
  }
}, V = d(f, [{
  field: ""
}]);
export {
  V as InputSort
};
