import { j as jsxRuntimeExports } from "../../../../../../../_virtual/jsx-runtime.js";
import EnumField from "./enum.js";
import { useParentBrick } from "../../../../../../../use-page-data.js";
function AlignItemsField(props) {
  const { brickId, onChange, schema } = props;
  const htmlElement = document.getElementById(brickId);
  useParentBrick(brickId);
  if (!htmlElement) {
    return null;
  }
  const flexOrientation = getComputedStyle(htmlElement).flexDirection;
  const customSchema = {
    ...schema,
    title: flexOrientation === "column" ? "Horizontal alignment" : `Vertical alignment`,
    "ui:display": "icon-group",
    description: flexOrientation === "column" ? "Aligns the child bricks horizontally. (align-items)" : "Aligns the child bricks vertically. (align-items)",
    enumNames: flexOrientation === "column" ? ["Left", "Center", "Right", "Stretch"] : ["Top", "Center", "Bottom", "Stretch"],
    "ui:icons": flexOrientation === "column" ? [
      "fluent:align-start-horizontal-20-regular",
      "fluent:center-horizontal-20-regular",
      "fluent:align-end-horizontal-20-regular",
      "fluent:auto-fit-width-20-regular"
    ] : [
      "fluent:align-start-vertical-20-regular",
      "fluent:center-vertical-20-regular",
      "fluent:align-end-vertical-20-regular",
      "fluent:auto-fit-height-20-regular"
    ]
  };
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
    EnumField,
    {
      ...props,
      schema: customSchema,
      title: customSchema.title,
      description: customSchema.description,
      onChange
    }
  );
}
export {
  AlignItemsField as default
};
//# sourceMappingURL=align-items.js.map
