const {
    ApplicationV2, 
    HandlebarsApplicationMixin
} = foundry.applications.api

export class XmlImportReportDialog extends HandlebarsApplicationMixin(ApplicationV2) {

    static DEFAULT_OPTIONS = {
        classes: ['dsa41', 'dialog', 'xmlimport'],
        tag: "form",
        position: {
            width: 320,
            height: 478
        },
        window: {
            resizable: false,
        },
        form: {
            submitOnChange: false,
            closeOnSubmit: true,
        },
    }

    static PARTS = {
        form: {
            template: 'systems/DSA_4-1/templates/dialog/xml-import-report.hbs',
        }
    }

    /**
     * @type {Actor}
     * @private
     */
    _actor = null
    _report = null

    constructor(actor, report) {
        super();
        this._actor = actor
        this._report = report
    }


    _configureRenderOptions(options) {
        super._configureRenderOptions(options)
        options.window.title = `${this._actor.name} import abgeschlossen`
        return options
    }

    async _prepareContext(options) {
        const context = await super._prepareContext(options)
        context.report = this._report
        return context
    }

    _onRender(context, options) {

    }


}