import { Box, FieldSet, Input } from "@wix/design-system";
import React, { useContext } from "react";
import { RicosContext } from "./../../ricos-context/index.js";
import { GENERAL_SETTINGS_BUTTON_TEXT_INPUT } from "../data-hooks.js";
import classes from "../statics/styles/settings-component-scss.js";
const SettingsComponent = ({
  buttonData,
  onChange,
  logBi
}) => {
  const { t } = useContext(RicosContext);
  return /* @__PURE__ */ React.createElement(
    Box,
    {
      direction: "vertical",
      gap: "SP2",
      padding: "SP3",
      paddingTop: "SP4",
      width: "100%",
      className: classes.formField
    },
    /* @__PURE__ */ React.createElement(FieldSet, { legend: t("ButtonModal_Button_Text") }, /* @__PURE__ */ React.createElement(
      Input,
      {
        type: "text",
        onChange: (e) => {
          onChange({ ...buttonData, text: e.target.value });
          logBi({ dataHook: GENERAL_SETTINGS_BUTTON_TEXT_INPUT, value: e.target.value });
        },
        value: buttonData.text ?? void 0,
        dataHook: GENERAL_SETTINGS_BUTTON_TEXT_INPUT,
        placeholder: t("ButtonModal_InputName_Placeholder"),
        size: "small",
        textOverflow: "ellipsis"
      }
    ))
  );
};
export {
  SettingsComponent
};
//# sourceMappingURL=settings-component.js.map
