import { getNamedSlotContent } from "../../../utils/slot-utils.js";
function getAttributesFromLinkSlotContent(host, slotName) {
    const namedSlotContent = getNamedSlotContent(host, slotName);
    if (0 === namedSlotContent.length) return;
    if (namedSlotContent.length > 1) console.warn(`More than one element found for slot "${slotName}", only the first one will be used.`, host);
    const attributesSlotContent = namedSlotContent[0];
    if ('A' !== attributesSlotContent.nodeName) return void console.warn(`Slot named "${slotName}" should be an "a" tag`, attributesSlotContent);
    return Array.from(attributesSlotContent.attributes).filter(({ nodeName })=>{
        if ('slot' === nodeName) return false;
        if ('href' === nodeName) {
            console.warn('The "href" attribute set on the "attributes" slot element will be ignored.');
            return false;
        }
        return true;
    });
}
export { getAttributesFromLinkSlotContent };
