import * as __WEBPACK_EXTERNAL_MODULE__application_schema_settings_SchemaSettings_mjs__ from "../../../../application/schema-settings/SchemaSettings.mjs";
import * as __WEBPACK_EXTERNAL_MODULE__schema_component_antd_form_item_FormItem_Settings_mjs__ from "../../../../schema-component/antd/form-item/FormItem.Settings.mjs";
import * as __WEBPACK_EXTERNAL_MODULE__schema_component_antd_table_v2_Table_Column_Decorator_mjs__ from "../../../../schema-component/antd/table-v2/Table.Column.Decorator.mjs";
import * as __WEBPACK_EXTERNAL_MODULE__schema_settings_hooks_useIsShowMultipleSwitch_mjs__ from "../../../../schema-settings/hooks/useIsShowMultipleSwitch.mjs";
import * as __WEBPACK_EXTERNAL_MODULE__Select_selectComponentFieldSettings_mjs__ from "../Select/selectComponentFieldSettings.mjs";
const CustomTitleComponentFieldSettings = new __WEBPACK_EXTERNAL_MODULE__application_schema_settings_SchemaSettings_mjs__.SchemaSettings({
    name: 'fieldSettings:component:CustomTitle',
    items: [
        {
            ...__WEBPACK_EXTERNAL_MODULE__Select_selectComponentFieldSettings_mjs__.fieldComponent,
            useVisible: __WEBPACK_EXTERNAL_MODULE__schema_component_antd_form_item_FormItem_Settings_mjs__.useIsMuiltipleAble
        },
        {
            ...__WEBPACK_EXTERNAL_MODULE__Select_selectComponentFieldSettings_mjs__.CustomTitle,
            useVisible: __WEBPACK_EXTERNAL_MODULE__schema_component_antd_form_item_FormItem_Settings_mjs__.useIsMuiltipleAble
        },
        {
            ...__WEBPACK_EXTERNAL_MODULE__Select_selectComponentFieldSettings_mjs__.setTheDataScope,
            useVisible () {
                const isSelectFieldMode = (0, __WEBPACK_EXTERNAL_MODULE__schema_component_antd_form_item_FormItem_Settings_mjs__.useIsSelectFieldMode)();
                const isFieldReadPretty = (0, __WEBPACK_EXTERNAL_MODULE__schema_component_antd_form_item_FormItem_Settings_mjs__.useIsFieldReadPretty)();
                return isSelectFieldMode && !isFieldReadPretty;
            }
        },
        {
            ...__WEBPACK_EXTERNAL_MODULE__Select_selectComponentFieldSettings_mjs__.setDefaultSortingRules,
            useComponentProps () {
                const { fieldSchema } = (0, __WEBPACK_EXTERNAL_MODULE__schema_component_antd_table_v2_Table_Column_Decorator_mjs__.useColumnSchema)();
                return {
                    fieldSchema
                };
            },
            useVisible () {
                const isSelectFieldMode = (0, __WEBPACK_EXTERNAL_MODULE__schema_component_antd_form_item_FormItem_Settings_mjs__.useIsSelectFieldMode)();
                const isFieldReadPretty = (0, __WEBPACK_EXTERNAL_MODULE__schema_component_antd_form_item_FormItem_Settings_mjs__.useIsFieldReadPretty)();
                return isSelectFieldMode && !isFieldReadPretty;
            }
        },
        {
            ...__WEBPACK_EXTERNAL_MODULE__Select_selectComponentFieldSettings_mjs__.quickCreate,
            useVisible () {
                const isAssociationField = (0, __WEBPACK_EXTERNAL_MODULE__schema_component_antd_form_item_FormItem_Settings_mjs__.useIsAssociationField)();
                const readPretty = (0, __WEBPACK_EXTERNAL_MODULE__schema_component_antd_form_item_FormItem_Settings_mjs__.useIsFieldReadPretty)();
                const { fieldSchema } = (0, __WEBPACK_EXTERNAL_MODULE__schema_component_antd_table_v2_Table_Column_Decorator_mjs__.useColumnSchema)();
                return isAssociationField && !fieldSchema && !readPretty;
            }
        },
        {
            ...__WEBPACK_EXTERNAL_MODULE__Select_selectComponentFieldSettings_mjs__.allowMultiple,
            useVisible () {
                const isAssociationField = (0, __WEBPACK_EXTERNAL_MODULE__schema_component_antd_form_item_FormItem_Settings_mjs__.useIsAssociationField)();
                const IsShowMultipleSwitch = (0, __WEBPACK_EXTERNAL_MODULE__schema_settings_hooks_useIsShowMultipleSwitch_mjs__.useIsShowMultipleSwitch)();
                return isAssociationField && IsShowMultipleSwitch();
            }
        },
        {
            ...__WEBPACK_EXTERNAL_MODULE__Select_selectComponentFieldSettings_mjs__.enableLink,
            useVisible () {
                const readPretty = (0, __WEBPACK_EXTERNAL_MODULE__schema_component_antd_form_item_FormItem_Settings_mjs__.useIsFieldReadPretty)();
                return (0, __WEBPACK_EXTERNAL_MODULE__schema_component_antd_form_item_FormItem_Settings_mjs__.useIsAssociationField)() && readPretty;
            }
        }
    ]
});
export { CustomTitleComponentFieldSettings };
