"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const utils_1 = require("../../../utils");
const helpers_1 = require("../helpers");
helpers_1.createRnCommand('rn:sync:name')
    .description('Ensures that the name/identifier in app.json is consistent with the project, otherwise it renames it.')
    .action(async () => {
    const { identifier, name } = utils_1.CONFIGS.APP_CONFIG.config;
    const currentAppId = helpers_1.getIdentifier();
    if (currentAppId !== identifier) {
        await utils_1.exec('yarn grund rn:rename', [name, identifier]);
    }
});
