"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.createModularDrawerConfiguration = exports.validateAndTransformConfigurationWithZod = exports.defaultDrawerConfiguration = void 0;
const types_1 = require("./types");
exports.defaultDrawerConfiguration = {
    assets: {
        rightElement: "balance",
    },
    networks: {
        leftElement: "numberOfAccounts",
    },
};
function validateAndTransformConfigurationWithZod(config) {
    const result = types_1.EnhancedModularDrawerConfigurationSchema.safeParse(config);
    if (!result.success) {
        console.warn("Modular Drawer invalid configuration received:", result.error);
        return {};
    }
    return result.data;
}
exports.validateAndTransformConfigurationWithZod = validateAndTransformConfigurationWithZod;
function createModularDrawerConfiguration(config) {
    const validatedConfig = validateAndTransformConfigurationWithZod(config);
    return {
        ...exports.defaultDrawerConfiguration,
        ...validatedConfig,
    };
}
exports.createModularDrawerConfiguration = createModularDrawerConfiguration;
//# sourceMappingURL=utils.js.map