import { UpdateEntityProps } from "./useUpdateEntity"; import { Entity } from "../../interfaces/models/Entity"; export type UseEntityDataProps = { entity: Entity; entityId?: undefined; foreignId?: undefined; shortId?: undefined; createIfNotFound?: undefined; } | { entity?: undefined; entityId: string; foreignId?: undefined; shortId?: undefined; createIfNotFound?: undefined; } | { entity?: undefined; entityId?: undefined; foreignId?: undefined; shortId: string; createIfNotFound?: undefined; } | { entity?: undefined; entityId?: undefined; foreignId: string; shortId?: undefined; createIfNotFound?: boolean; }; export interface UseEntityDataValues { entity: Entity | null | undefined; setEntity: React.Dispatch>; updateEntity(props: Pick): Promise; deleteEntity: () => Promise; } declare function useEntityData({ entityId, foreignId, shortId, entity: entityProp, createIfNotFound, }: UseEntityDataProps): UseEntityDataValues; export default useEntityData;