import { Column } from '../../../../_common';
import { ITenantAttribute, IDataTypeInstance, ICacheEntitiesAttributeInSetCache } from '../../../services/api/DataHub/Attributes';
import { IDataTypesAttributeConfigurationAbstract } from '../../../services/api/common';
import { ITenantAttributeScope } from '../../../services/api/DataHub/Scopes';
import { ITenantAttributeLanguage } from '../../../services/api/DataHub/Languages';

export interface IDatahubDataTypeEditorProps<T = unknown, C extends IDataTypesAttributeConfigurationAbstract = IDataTypesAttributeConfigurationAbstract> {
    modelValue?: T;
    readOnly?: boolean;
    attribute?: ITenantAttribute<C>;
    massEditing?: boolean;
    label?: string;
    fieldName?: string;
    dataTypeInstance: IDataTypeInstance<C>;
    loading?: boolean;
}
export interface IDatahubDataTypeEditorEmits<T = unknown> {
    (event: "validated", isValid: boolean): void;
    (event: "update:model-value", isValid: T): void;
}
export interface IDatahubDataTypeRendererProps<CellValue = any, CellProperty extends Record<string, any> = Record<string, any>, Row extends Record<string, any> = Record<string, any>, AttributeConfig extends IDataTypesAttributeConfigurationAbstract = IDataTypesAttributeConfigurationAbstract> {
    row?: Row;
    rowIndex?: number;
    cell?: Column<CellProperty>;
    cellValue?: CellValue;
    dataTypeInstance?: IDataTypeInstance<AttributeConfig>;
    modelValue?: unknown;
}
export interface IDatahubDataTypeConfigurationProps<AttributeConfig extends IDataTypesAttributeConfigurationAbstract = IDataTypesAttributeConfigurationAbstract> {
    attribute: ITenantAttribute<AttributeConfig>;
    dataTypeInstance: IDataTypeInstance<AttributeConfig>;
    remoteScopes?: ITenantAttributeScope[];
    remoteLanguages?: ITenantAttributeLanguage[];
    remoteAttributes?: ICacheEntitiesAttributeInSetCache[];
    readonly?: boolean;
}
export interface ILangScopeItem {
    scope?: ITenantAttributeScope;
    language?: ITenantAttributeLanguage;
}
export interface ILangScopeSelection {
    scopes: ITenantAttributeScope[];
    languages: ITenantAttributeLanguage[];
    custom: ILangScopeItem[];
    attributes: ICacheEntitiesAttributeInSetCache[];
}
export type IBlockedAttribute = {
    [scopeId: number]: {
        [languageId: number]: boolean;
    };
};
export type IBlockedAttributes = {
    [attributeId: number]: IBlockedAttribute;
};
export interface IDatahubDataEntityProps {
}
