'use strict';

var index = require('./index-CpWVsZ_u.js');

const downloadCss = () => ``;

const Download = class {
    constructor(hostRef) {
        index.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 (index.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" }, index.h("slot", { key: 'e406b64e8c517ebb16b0463c8fed0ed8b80fe695' })));
    }
};
Download.style = downloadCss();

exports.ifx_download = Download;
//# sourceMappingURL=ifx-download.entry.cjs.js.map

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