import * as __WEBPACK_EXTERNAL_MODULE__modules_variable_useVariable_mjs__ from "../../../modules/variable/useVariable.mjs";
import * as __WEBPACK_EXTERNAL_MODULE__useBaseVariable_mjs__ from "./useBaseVariable.mjs";
const usePopupVariable = function() {
    let props = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {};
    const { value, title, collection } = (0, __WEBPACK_EXTERNAL_MODULE__modules_variable_useVariable_mjs__.useVariable)('$nPopupRecord');
    const settings = (0, __WEBPACK_EXTERNAL_MODULE__useBaseVariable_mjs__.useBaseVariable)({
        collectionField: props.collectionField,
        uiSchema: props.schema,
        name: '$nPopupRecord',
        title,
        collectionName: null == collection ? void 0 : collection.name,
        noDisabled: props.noDisabled,
        targetFieldSchema: props.targetFieldSchema,
        dataSource: null == collection ? void 0 : collection.dataSource
    });
    return {
        settings,
        popupRecordCtx: value,
        shouldDisplayPopupRecord: !!value,
        collectionName: null == collection ? void 0 : collection.name,
        dataSource: null == collection ? void 0 : collection.dataSource
    };
};
export { usePopupVariable };
