"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.useLayoutResetter = void 0;
var ui_i18n_1 = __importDefault(require("ui-i18n"));
var useSnackbar_1 = require("../useSnackbar");
var useLayoutResetter = function (_a) {
    var onLayoutReset = _a.onLayoutReset, onResetUndo = _a.onResetUndo;
    var resetLayout = function () {
        onLayoutReset();
        showSnackbarMessage(ui_i18n_1.default.text("The default layout is now restored. It's still not too late to revert your changes. Click Undo to go back to your personalized settings."));
    };
    var _b = (0, useSnackbar_1.useSnackbar)({
        onDismissClick: onResetUndo,
        showDismiss: true,
        autoHideDuration: 5000,
        dismissTitle: ui_i18n_1.default.text('Undo')
    }), SnackbarRenderer = _b.SnackbarRenderer, showSnackbarMessage = _b.showSnackbarMessage;
    return { SnackbarRenderer: SnackbarRenderer, resetLayout: resetLayout };
};
exports.useLayoutResetter = useLayoutResetter;
