import { Decoration_Type } from "./../ricos-schema/next-schema/index.js";
const fontFamilyConverter = {
  fromPm: {
    type: Decoration_Type.FONT_FAMILY,
    convert: (mark) => {
      const { attrs } = mark;
      if (!attrs || !attrs.value) {
        return [];
      }
      return [
        {
          type: Decoration_Type.FONT_FAMILY,
          fontFamilyData: {
            value: attrs.value
          }
        }
      ];
    }
  },
  toPm: {
    type: Decoration_Type.FONT_FAMILY,
    convert: (decoration) => {
      const { fontFamilyData } = decoration;
      if (!fontFamilyData || !fontFamilyData.value) {
        return void 0;
      }
      return {
        type: Decoration_Type.FONT_FAMILY,
        attrs: {
          value: fontFamilyData.value
        }
      };
    }
  }
};
export {
  fontFamilyConverter
};
//# sourceMappingURL=font-family-converter.js.map
