import './style.scss'
// import javascriptLogo from './javascript.svg'
// import { get } from './lib/utility'
// import { createPicture, createAudio, createVideo, createPdf } from './lib/ui/media'
import './lib/element/style.scss'
import ScheduleItem from './lib/element/schedule'
import { createElement } from './lib/functions';

// document.querySelector('#js-logo').src = javascriptLogo

window.consts = {
    path: '/',
    resver: 20231218
}

const schedule = new ScheduleItem();
document.querySelector('#container').replaceChildren(
    schedule.create(),
    createElement('button', button => {
        button.innerText = 'Get';
        button.addEventListener('click', () => console.log(schedule.getParameters()));
    })
);

// document.querySelector('#container').replaceChildren(
//     // createPicture('https://fleet.foresightintelligence.com/doc/mmspart/1740581frZuuFhz5WWCysxs9oGB.jpg'),
//     createAudio('audio/amr', 'http://vite.tsanie.org/1055003tb0DisaMu1615PeSXKG.amr'),
//     createPdf('AG-PRO COMPANIES', 'https://fleet.foresightintelligence.com/doc/mmspart/1333321JLrYhkGYqsw6QSVMx3d.pdf'),
//     // createPicture('https://fleet.foresightintelligence.com/doc/mmspart/138390UGZUMWRmqBsEgPnWuW16.gif'),
//     // createVideo('https://fleet.foresightintelligence.com/doc/mmspart/17359338sR5qsG7TvS7eaUdP9PL.mp4'),
// );

/*
init(null, {
    template: '/res.json',
    callback: result => console.log(result)
}).then(() => {
    // document.querySelector('#create-icon').appendChild(createIcon('fa-solid', 'user-edit'))
    resolveIcon(document.querySelector('#create-icon'))

    // document.querySelector('#create-checkbox').appendChild(createCheckbox({
    //     label: 'Switch 1'
    // }))
    resolveCheckbox(document.querySelector('#create-checkbox'))

    resolveTooltip(document.querySelector('#buttons'))

    document.querySelector('#button-fetch').addEventListener('click', () => {
        get('javascript.svg', {
            // contentType: '',
            customHeaders: {
                'X-Auth': 'test/authentication'
            }
        })
            .then(r => r.blob())
            .then(blob => document.querySelector('#js-logo').src = URL.createObjectURL(blob));
    });
});
*/