import { UmbUfmFilterBase } from './base.filter.js';
class UmbUfmStripHtmlFilterApi extends UmbUfmFilterBase {
    filter(value) {
        if (!value)
            return '';
        const markup = typeof value === 'object' && Object.hasOwn(value, 'markup') ? value.markup : value;
        const parser = new DOMParser();
        const doc = parser.parseFromString(markup, 'text/html');
        return doc.body.textContent ?? '';
    }
}
export { UmbUfmStripHtmlFilterApi as api };
export { UmbUfmStripHtmlFilterApi };
