import * as __WEBPACK_EXTERNAL_MODULE__tachybase_schema__ from "@tachybase/schema";
import * as __WEBPACK_EXTERNAL_MODULE__collection_manager_index_mjs__ from "../../collection-manager/index.mjs";
function useIsShowMultipleSwitch() {
    var _uiSchema_xcomponentprops, _field_componentProps;
    const field = (0, __WEBPACK_EXTERNAL_MODULE__tachybase_schema__.useField)();
    const fieldSchema = (0, __WEBPACK_EXTERNAL_MODULE__tachybase_schema__.useFieldSchema)();
    const { getCollectionField } = (0, __WEBPACK_EXTERNAL_MODULE__collection_manager_index_mjs__.useCollectionManager_deprecated)();
    const collectionField = fieldSchema['x-collection-field'] ? getCollectionField(fieldSchema['x-collection-field']) : null;
    const uiSchema = (null == collectionField ? void 0 : collectionField.uiSchema) || fieldSchema;
    const hasMultiple = (null === (_uiSchema_xcomponentprops = uiSchema['x-component-props']) || void 0 === _uiSchema_xcomponentprops ? void 0 : _uiSchema_xcomponentprops.multiple) === true;
    const fieldMode = null == field ? void 0 : null === (_field_componentProps = field.componentProps) || void 0 === _field_componentProps ? void 0 : _field_componentProps['mode'];
    return function() {
        return !field.readPretty && 'TableField' !== fieldSchema['x-component'] && hasMultiple && 'SubTable' !== fieldMode;
    };
}
export { useIsShowMultipleSwitch };
