import React, { useContext } from "react";
import { RicosContext } from "./../../../ricos-context/index.js";
import { DropdownModal } from "./../../../_shared/dropdown-modal/dropdown-modal.js";
import { ListItemSelect } from "./../../../_shared/list-item-select/list-item-select.js";
const LineStylePanel = ({
  onSelect,
  selectedId,
  closeModal,
  dropdownOptions
}) => {
  const { t, isMobile } = useContext(RicosContext);
  return /* @__PURE__ */ React.createElement(
    DropdownModal,
    {
      onCloseButtonClick: closeModal,
      title: t("DividerPlugin_SelectType_Tooltip"),
      options: dropdownOptions.map(
        ({ dataHook, icon: Icon, iconMobile: IconMobile, label: text, id: commandKey }) => /* @__PURE__ */ React.createElement(
          ListItemSelect,
          {
            key: commandKey,
            dataHook,
            prefix: isMobile && IconMobile ? /* @__PURE__ */ React.createElement(IconMobile, null) : Icon ? /* @__PURE__ */ React.createElement(Icon, null) : null,
            title: t(text),
            selected: commandKey === selectedId,
            onSelect: () => {
              onSelect(commandKey);
              closeModal();
            }
          }
        )
      )
    }
  );
};
export {
  LineStylePanel
};
//# sourceMappingURL=line-style-panel.js.map
