/*!
 * KoliBri - The accessible HTML-Standard
 */
import { createPropDefinition } from "./helpers/factory";
import { normalizeObject, normalizeString } from "./helpers/normalizers";
function normalizeSpanIcons(value) {
    if (!value || (typeof value === 'string' && value === '')) {
        return {};
    }
    if (typeof value === 'string') {
        return normalizeString(value);
    }
    if (typeof value === 'object') {
        return normalizeObject(value);
    }
    throw new Error(`Invalid icons: ${typeof value}`);
}
function validateSpanIcons(value) {
    if (typeof value === 'string') {
        return value.length > 0;
    }
    return typeof value === 'object' && value !== null;
}
export const spanIconsProp = createPropDefinition('icons', {}, normalizeSpanIcons, validateSpanIcons);
//# sourceMappingURL=span-icons.js.map
