"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.AppDefinition = exports.appDefinition = void 0;
const appDefinition = (definition) => definition;
exports.appDefinition = appDefinition;
function toSupported(supportedNetworks) {
    return Object.keys(supportedNetworks).map((network) => ({
        network,
        actions: supportedNetworks[network],
    }));
}
class AppDefinitionToken {
}
class AppSupportedNetwork {
}
class AppDefinition {
    constructor(definitionRaw) {
        var _a, _b, _c;
        this.id = definitionRaw.id;
        this.name = definitionRaw.name;
        this.description = (_a = definitionRaw.description) !== null && _a !== void 0 ? _a : '';
        this.url = definitionRaw.url;
        this.links = definitionRaw.links;
        this.keywords = (_b = definitionRaw.keywords) !== null && _b !== void 0 ? _b : [];
        this.tags = definitionRaw.tags;
        this.groups = definitionRaw.groups;
        this.presentationConfig = definitionRaw.presentationConfig;
        this.supportedNetworks = toSupported((_c = definitionRaw.supportedNetworks) !== null && _c !== void 0 ? _c : {});
        this.token = definitionRaw.token;
    }
}
exports.AppDefinition = AppDefinition;
//# sourceMappingURL=app.definition.js.map