'use strict';

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

const downloadCss = "";

const Download = class {
    constructor(hostRef) {
        index.registerInstance(this, hostRef);
        this.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: '51887d03944efc6448ef2c71288a16754bebf12f', 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: '8b4c69297dcbf44cf7182e8db89758a4f3a1f981' })));
    }
};
Download.style = downloadCss;

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

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