"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.DataSetInternalApi = void 0;
const ApiBase_1 = require("../Implementation/ApiBase");
class DataSetInternalApi extends ApiBase_1.ApiBase {
    showDataSetForm(dataSet) {
        if (dataSet.form) {
            this.getAdaptableInternalApi().showPopupForm({
                Id: 'data-set-form',
                Form: dataSet.form,
                prepareContext: (context) => {
                    return new Promise((resolve) => {
                        const preparedContext = {
                            ...context,
                            dataSet,
                        };
                        resolve(preparedContext);
                    });
                },
            });
        }
    }
}
exports.DataSetInternalApi = DataSetInternalApi;
