const toEntries = (wixTypography) => Object.entries(wixTypography);
const definitionToCssFont = (def) => def.value.substr(5, def.value.length - 6);
const toVars = (wixTypography) => toEntries(wixTypography).reduce(
  (prev, curr) => ({
    ...prev,
    [`font-${curr[0].toLowerCase()}`]: definitionToCssFont(curr[1])
  }),
  {}
);
function createTypography(typography) {
  if (!typography) {
    return {};
  }
  const { fontFamily, wixTypography } = typography;
  const wixTypographyVars = wixTypography ? toVars(wixTypography) : {};
  return Object.assign(wixTypographyVars, fontFamily && { fontFamily });
}
export {
  createTypography
};
//# sourceMappingURL=typography.js.map
