module.exports = {
    name: 'email-header',
    asyncData(ctx) {
        return {
            isPreview: ctx.method === 'GET',
        };
    },
    created() {
        const embeded = [];
        this.files.map(file => {
            const src = this.isPreview ? `/api/${file}` : `cid:${file}`;
            embeded[file] = src;
        });
        this.embeded = embeded;
    },

    data() {
        return {
            files: ['/assets/images/email-logo.png'],
        };
    },
};