import { TitleIcon, TitleOneIcon, TitleTwoIcon } from "./icons/index.js";
const titleStateMap = {
  unstyled: {
    icon: TitleIcon,
    action: "header-two"
  },
  "header-two": {
    icon: TitleOneIcon,
    action: "header-three"
  },
  "header-three": {
    icon: TitleTwoIcon,
    action: "unstyled"
  }
};
const getCurrentTitleState = (publicCommands) => {
  const selectedHeading = publicCommands.getCurrentHeading();
  return titleStateMap[selectedHeading] || titleStateMap.unstyled;
};
const getTitleIcon = ({ publicCommands }) => {
  const currentTitleState = getCurrentTitleState(publicCommands);
  return currentTitleState.icon;
};
const getTitleOnClick = (publicCommands) => {
  const currentTitleState = getCurrentTitleState(publicCommands);
  const currentTitleAction = currentTitleState.action;
  return () => publicCommands.setBlockType(currentTitleAction);
};
export {
  getTitleIcon,
  getTitleOnClick
};
//# sourceMappingURL=title-button-utils.js.map
