import { CSSProperties } from 'vue';
import { getColorString } from './color.ts';

export function getTextStyles(design: TextDesignData): CSSProperties {
  return {
    fontSize: `${design.size}px`,
    fontFamily: design.font,
    background: design.color ? getColorString(design.color) : undefined,
    fontStyle: design.italic ? 'italic' : 'normal',
    fontWeight: design.bold ? 'bold' : 'normal',
  };
}
