import { VoidFunc, VoidFuncNoParam } from "../../../../fd-toolbox/functions/internal-getter-setter-functions";
import { EditResourceRequest } from "../../crud/edit-resource-request";
import { PropertyMeta } from "../../core/property-meta";
import { ResourceMeta } from "../../core/resource-meta";
import { UiPropertyMeta } from "../../core/ui-property-meta";
import { WithId } from "../../../../fd-toolbox-core/types/resource-with-id";
import { WithIndexer } from "../../../../fd-toolbox-core/types/with-indexer";
import { Validators } from "./form-validations";
import { FieldValues, UseFormGetValues, UseFormReturn } from "react-hook-form";
import { UiResourceMeta } from "../../ui-resource-meta";
import { ManageSectionItem } from "../manage-section-item";
import { EditResourceCustomFieldConfig } from "../config/edit-resource-config-custom-field";
import { PropertyRelationSyncInfo } from "../../crud/property-relation-sync-info";
import { LoginState } from "../../../../fd-toolbox/auth/login-state";
export declare function submitEditResource(form: UseFormReturn, resource: WithId, isNew: boolean, resourceMeta: ResourceMeta, shouldClose?: boolean, onSaveComplete?: VoidFunc<boolean, string>, changedValues?: FieldValues, notifySaveComplete?: VoidFuncNoParam): Promise<void>;
export declare function getEditResourceForUpdate(resourceMeta: ResourceMeta, values: FieldValues, resource: WithId): Promise<{
    resourceName: string;
    resource: WithId;
    propertyRelationSyncInfos: PropertyRelationSyncInfo[];
}>;
export declare function createOrUpdateEditResource(editResource: EditResourceRequest, isNew: boolean, resourceMeta: ResourceMeta, resource: WithId, form: UseFormReturn, shouldClose?: boolean, onSaveComplete?: VoidFunc<boolean, string>, notifySaveComplete?: VoidFuncNoParam): Promise<void>;
/**
 * Saves or edits resource
 *
 *  @param editResource - object that will be sent to api {@link EditResourceRequest}
 *  @param isNew - if (`true`) creates resource, if (`false`) updates existing one {boolean}
 *  @param resourceMeta - all information about resource {@link ResourceMeta}
 *  @param resource - resource object with `id` property, used to upload blobs {@link WithId}
 *  @param form - form object, returning values from input fields
 */
export declare function createOrUpdateResource(editResource: EditResourceRequest, isNew: boolean, resourceMeta: ResourceMeta, resource: WithId, form: UseFormReturn): Promise<any>;
export declare function tryUploadBlobs(resource: WithId, form: UseFormReturn, resourceMeta: ResourceMeta): Promise<void>;
export declare function createEditResourceForm(setValue: VoidFunc<string, unknown>, uiResourceMeta: UiResourceMeta, resource: WithId, getFormValue: UseFormGetValues<FieldValues>, isNew?: boolean): WithIndexer<Validators>;
export declare function isDefaultInputField(propertyMeta: PropertyMeta): boolean;
export declare function isImageField(propertyMeta: PropertyMeta): boolean;
export declare function configureManageSection(uiResourceMeta: UiResourceMeta, resource: WithId): ManageSectionItem[];
export declare function splitPropertyMetasLeftAndRight(leftMetas: WithIndexer<UiPropertyMeta>, rightMetas: WithIndexer<UiPropertyMeta>, uiResourceMeta: UiResourceMeta): WithIndexer<UiPropertyMeta>[];
export declare function fillColumnData(leftUiPropertyMetas: WithIndexer<UiPropertyMeta>, setLeftUiPropertyMetas: VoidFunc<WithIndexer<UiPropertyMeta>>, setLeftCustomActions: VoidFunc<EditResourceCustomFieldConfig[]>, uiResourceMeta: UiResourceMeta, customActionFields?: EditResourceCustomFieldConfig[]): void;
export declare function onRelatedEditResourcesChange(relatedResourcesChange: [WithId[], PropertyMeta], relatedResource: Map<PropertyMeta, WithId[]>): void;
export declare function updateLoginStateOnEditResourceSave(editResource: EditResourceRequest, updatedLoginState: Partial<LoginState>): void;
