// Dependencies import { flagTypes } from 'plugins/plugin-annotations/src/flag.mjs' import mustache from 'mustache' import { nsMerge } from 'shared/utils.mjs' // Hooks import { useTranslation } from 'next-i18next' import { useState } from 'react' // Components import { CloseIcon, ChatIcon, TipIcon, WarningIcon, ErrorIcon, FixmeIcon, ExpandIcon, } from 'shared/components/icons.mjs' import Markdown from 'react-markdown' const flagColors = { note: 'primary', tip: 'accent', warn: 'error', error: 'error', fixme: 'warning', } const flagIcons = { note: ChatIcon, tip: TipIcon, warn: WarningIcon, error: ErrorIcon, fixme: FixmeIcon, // Used in content expand: ExpandIcon, } export const Flags = ({ flags, update }) => { const handleUpdate = (config) => { if (config.settings) update.settings(...config.settings) if (config.ui) update.ui(...config.settings) } return (