import {NameCardCreator} from "../wwwroot/core/namecards/nameCardCreator.js";
import {launchWorker} from "../wwwroot/core/namecards/workerLauncher.js";
import {data} from "../wwwroot/core/appData.js";

const templatePath = "./wwwroot/assets/name-card-template.png";
const avatarPath = "./tests/assets/avatar-test.png";
const name = "Aude Vaiselle";


try {
    launchWorker({
        templatePath : data.nameCardTemplate,
        avatarURL: avatarPath,
        username: name,
    }).then(buffer => {
        //Send name card here...
        console.log('Name card sent!');
    }).catch(console.error);
} catch (err) {
    console.error('Failed to generate/send name card:', err);
}