import { Decoration_Type, TextStyle_TextAlignment } from "./../../ricos-schema/legacy/wix/rich_content/v1/index.js";
const isTextData = (data) => typeof data?.text === "string" && Array.isArray(data?.decorations) && data.decorations.every(isDecoration);
const DECORATION_TYPES = [
  Decoration_Type.ANCHOR,
  Decoration_Type.BOLD,
  Decoration_Type.COLOR,
  Decoration_Type.EXTERNAL,
  Decoration_Type.FONT_SIZE,
  Decoration_Type.ITALIC,
  Decoration_Type.LINK,
  Decoration_Type.MENTION,
  Decoration_Type.SPOILER,
  Decoration_Type.UNDERLINE
];
const isDecoration = (data) => DECORATION_TYPES.includes(data.type);
const isParagraphData = (data) => !!data && (!data.indentation || typeof data.indentation === "number") && (!data.textStyle || [
  TextStyle_TextAlignment.AUTO,
  TextStyle_TextAlignment.CENTER,
  TextStyle_TextAlignment.JUSTIFY,
  TextStyle_TextAlignment.LEFT,
  TextStyle_TextAlignment.RIGHT
].includes(data.textStyle.textAlignment));
export {
  isParagraphData,
  isTextData
};
//# sourceMappingURL=node-data-refined-types.js.map
