// Copyright 2026 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import '/strings.m.js';
import 'chrome://resources/cr_elements/cr_button/cr_button.js';
import { ColorChangeUpdater } from 'chrome://resources/cr_components/color_change_listener/colors_css_updater.js';
import { loadTimeData } from 'chrome://resources/js/load_time_data.js';
import { CrLitElement } from 'chrome://resources/lit/v3_0/lit.rollup.js';
import { getCss } from './app.css.js';
import { getHtml } from './app.html.js';
import { BrowserProxy } from './browser_proxy.js';
export class DefaultBrowserModalAppElement extends CrLitElement {
    static get is() {
        return 'default-browser-modal-app';
    }
    static get styles() {
        return getCss();
    }
    render() {
        return getHtml.bind(this)();
    }
    static get properties() {
        return {
            useSettingsIllustration: {
                type: Boolean,
                reflect: true,
            },
        };
    }
    firstUpdated() {
        ColorChangeUpdater.forDocument().start();
        if (!this.isModal_) {
            return;
        }
        BrowserProxy.getInstance().handler.showUI();
    }
    #useSettingsIllustration_accessor_storage = loadTimeData.getBoolean('useSettingsIllustration');
    get useSettingsIllustration() { return this.#useSettingsIllustration_accessor_storage; }
    set useSettingsIllustration(value) { this.#useSettingsIllustration_accessor_storage = value; }
    isModal_ = loadTimeData.getBoolean('isModal');
    onCancelClick_() {
        BrowserProxy.getInstance().handler.cancel();
    }
    onConfirmClick_() {
        BrowserProxy.getInstance().handler.confirm();
    }
}
customElements.define(DefaultBrowserModalAppElement.is, DefaultBrowserModalAppElement);
