import { r as registerInstance, h } from './index-Cby2wKoI.js';

const downloadCss = () => ``;

const Download = class {
    constructor(hostRef) {
        registerInstance(this, hostRef);
    }
    tokens = "css";
    render() {
        const fileMap = {
            css: "css-variables.css",
            scss: "scss-variables.scss",
        };
        const fileName = `infineon-tokens.${this.tokens}`;
        const sourceFile = fileMap[this.tokens];
        const fileUrl = `https://raw.githubusercontent.com/Infineon/public-assets/main/ifx-tokens/${sourceFile}`;
        return (h("ifx-link", { key: '866856c6190b54063704b1f98b3556f1b4181add', onClick: (e) => {
                e.preventDefault();
                fetch(fileUrl)
                    .then((res) => res.blob())
                    .then((blob) => {
                    const link = document.createElement("a");
                    link.href = URL.createObjectURL(blob);
                    link.download = fileName;
                    link.click();
                });
            }, href: fileUrl, download: fileName, class: "download__wrapper", size: "m", variant: "bold" }, h("slot", { key: 'e406b64e8c517ebb16b0463c8fed0ed8b80fe695' })));
    }
};
Download.style = downloadCss();

export { Download as ifx_download };
//# sourceMappingURL=ifx-download.entry.js.map

//# sourceMappingURL=ifx-download.entry.js.map