import { FileUploadType, type PropertyType } from "../../../fd-toolbox/enums/enums";
import { Relation } from "./relation";
import { UiPropertyMetaOld } from "./ui-property-meta-old";
/**
 * @interface PropertyMeta is a part of {@link ResourceMeta} that keeps data
 * that's transported to frontend.
 * Information about properties of a resource.
 */
export interface PropertyMeta {
    /**
     * Unique identifier for the property. By default, this is a randomly generated Uuid,
     * but it can be explicitly set using the @{@link resourcePropertyId} decorator.
     */
    id: string;
    /**
     * User-frendly name for the property that is displayed in the Ui.
     * By default, it's generated from the property name, but can be
     * explicitly set using the @{@link label} decorator.
     */
    displayName: string;
    /** Property name from the resource class */
    name: string;
    /** Type of the property, indicating what kind of values the property will contain */
    type: PropertyType;
    /**
     * More specific type format for Ui rendering and validation.
     * While 'type' represents the base data type, typeFormat provides
     * additional typing information for specialized Ui handling.
     *
     * Can be set with decorators @{@link dateOnly}, @{@link richText},
     * @{@link markdown}, @{@link url}, @{@link phoneNumber}, @{@link email},
     * @{@link bigText}, @{@link currency}, @{@link flagsEnum}.
     * @see {@link propertyTypeFormats}
     */
    typeFormat: string;
    /** Display names for enum values when the property is an enum */
    enumerationDisplayName?: string[];
    /**
     * Enum values corresponding to the display names in the same order.
     * Each numeric value is paired with the text representation at the same index in {@link enumerationDisplayName}.
     */
    enumerationValues?: number[];
    /**
     * Indicates whether the property is required when creating or updating a resource
     * When true and the property is missing during update, an error will be thrown.
     * Can be set using the @{@link required} decorator.
     */
    required: boolean;
    /**
     * Indicates whether the property can be edited externally (via Api or client interface).
     * When false, client-side edits will not be allowed.
     * Can be set to false using the @{@link notEditableFromOutside} decorator.
     */
    isOutsideEditable: boolean;
    /**
     * Indicates whether the property is visible in Ui interface elements.
     * Can be set to false using the @{@link notDisplayable} decorator.
     */
    isDisplayable: boolean;
    /**
     * Indicates whether the property is visible in list.
     * Can be set to false using the @{@link notListDisplayable} decorator.
     */
    isListDisplayAdvisable: boolean;
    /** Forces the property to be shown in view even if it would otherwise be hidden */
    isViewVisible?: boolean;
    /** Relationships between resources when this property represents a link to another resource */
    relation?: Relation;
    /**
     * Determines whether the property is completely excluded from external.
     * Can be set to true using the @{@link outsideExcluded} decorator.
     */
    isOutsideExcluded: boolean;
    /**
     * Array of property names that, if they have values, will make this property required.
     * Can be set using the @{@link requiredIfOtherArePresent} decorator.
     */
    requiredIfOtherArePresent?: string[];
    /**
     * Makes this property required if another specified property has a specific value.
     * Can be set using the @{@link requiredIfPropHasValue} decorator.
     */
    requiredIfPropHasValue?: [string, unknown];
    /**
     * Display priority of the property in the Ui.
     */
    ui: UiPropertyMetaOld;
    /**
     * Type of file upload for this property (multiple or single).
     * Can be set using the @{@link fileUpload} decorator.
     */
    fileUploadType?: FileUploadType;
    /**
     * Indicates whether the property is a Blob image that should be displayed as an image in the user interface.
     * Can be set using the @{@link blobImage} decorator.
     */
    isBlobImage?: boolean;
    /**
     * Indicates whether the property is dynamic, meaning that it is not stored in the database
     * but instead is generated by handlers at runtime.
     * Can be set using the @{@link dynamic} decorator.
     */
    isDynamic?: boolean;
}
/** @internal */
export declare function createPropertyMeta(resourceMetaId: string, displayName: string, name: string): PropertyMeta;
export declare function getEnumDisplayValue(value: string, propertyMeta: PropertyMeta): string;
