/**
 *       _  ___   Another      
 *      / |/ (_)______ __ _____
 *     /    / / __(_-</ // (_-<
 *    /_/|_/_/\__/___/\_, /___/ 
 *                   /___/     
 *       production !
 * 
 * Licensed under the MIT License: 
 * This code is free to use and modify, 
 * as long as the copyright notice and license are kept.
 */
class ProfilePreferencesResetDialog extends WindozDialogContent {
    actions = [
        {
            label: 'Cancel',
            onclick: this.cancel.bind(this),
            severity: 'secondary',
            role: 'cancel'
        },
        {
            label: 'Reset',
            onclick: this.reset.bind(this),
            severity: 'danger',
            role: 'reset'
        }
    ]

    cancel() {
        this.commit(false);
    }

    reset() {
        app.User.preferences = {};
        app.User.savePreferences();
        
        this.commit(true);
    }
}

app.registerClass('ProfilePreferencesResetDialog',ProfilePreferencesResetDialog);
