import {IconDefinition} from "@fortawesome/free-solid-svg-icons";

export interface PanelComponent {
    id: number,
    title: string,
    badge: string,
    description: string,
    icon: IconDefinition,
    action?: () => void,
}

export default class Editor {
    public static convertToHtml(text: string): string {
        return text
            .split(/\n\s*\n/)
            .map((paragraph: string): string => `<p>${paragraph.trim()}</p>`)
            .join('');
    }

}
