1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3exports.requireAndResolveExpoModuleConfig = exports.ExpoModuleConfig = void 0;
4/**
5 * A class that wraps the raw config (`expo-module.json` or `unimodule.json`).
6 */
7class ExpoModuleConfig {
8    constructor(rawConfig) {
9        this.rawConfig = rawConfig;
10    }
11    /**
12     * Whether the module supports given platform.
13     */
14    supportsPlatform(platform) {
15        return this.rawConfig.platforms?.includes(platform) ?? false;
16    }
17    /**
18     * Returns a list of names of Swift native modules classes to put to the generated modules provider file.
19     */
20    iosModulesClassNames() {
21        return this.rawConfig.ios?.modulesClassNames ?? [];
22    }
23    /**
24     * Returns serializable raw config.
25     */
26    toJSON() {
27        return this.rawConfig;
28    }
29}
30exports.ExpoModuleConfig = ExpoModuleConfig;
31/**
32 * Reads the config at given path and returns the config wrapped by `ExpoModuleConfig` class.
33 */
34function requireAndResolveExpoModuleConfig(path) {
35    // TODO: Validate the raw config against a schema.
36    // TODO: Support for `*.js` files, not only static `*.json`.
37    return new ExpoModuleConfig(require(path));
38}
39exports.requireAndResolveExpoModuleConfig = requireAndResolveExpoModuleConfig;
40//# sourceMappingURL=ExpoModuleConfig.js.map