import { ProjectScopeConfig, SubAgentScopeConfig } from "../../db/manage/scope-definitions.js";
import { PaginationConfig } from "../../types/utility.js";
import "../../types/index.js";
import { AgentsManageDatabaseClient } from "../../db/manage/manage-client.js";
import { DataComponentInsert, DataComponentSelect, DataComponentUpdate } from "../../types/entities.js";

//#region src/data-access/manage/dataComponents.d.ts
/**
 * Get a data component by ID
 */
declare const getDataComponent: (db: AgentsManageDatabaseClient) => (params: {
  scopes: ProjectScopeConfig;
  dataComponentId: string;
}) => Promise<DataComponentSelect | null>;
/**
 * List all data components for a tenant/project
 */
declare const listDataComponents: (db: AgentsManageDatabaseClient) => (params: {
  scopes: ProjectScopeConfig;
}) => Promise<DataComponentSelect[]>;
/**
 * List data components with pagination
 */
declare const listDataComponentsPaginated: (db: AgentsManageDatabaseClient) => (params: {
  scopes: ProjectScopeConfig;
  pagination?: PaginationConfig;
}) => Promise<{
  data: DataComponentSelect[];
  pagination: {
    page: number;
    limit: number;
    total: number;
    pages: number;
  };
}>;
/**
 * Create a new data component
 */
declare const createDataComponent: (db: AgentsManageDatabaseClient) => (params: DataComponentInsert) => Promise<DataComponentSelect>;
/**
 * Update a data component
 */
declare const updateDataComponent: (db: AgentsManageDatabaseClient) => (params: {
  scopes: ProjectScopeConfig;
  dataComponentId: string;
  data: DataComponentUpdate;
}) => Promise<DataComponentSelect | null>;
/**
 * Delete a data component
 */
declare const deleteDataComponent: (db: AgentsManageDatabaseClient) => (params: {
  scopes: ProjectScopeConfig;
  dataComponentId: string;
}) => Promise<boolean>;
/**
 * Get data components for a specific agent
 */
declare const getDataComponentsForAgent: (db: AgentsManageDatabaseClient) => (params: {
  scopes: SubAgentScopeConfig;
}) => Promise<DataComponentSelect[]>;
/**
 * Associate a data component with an agent
 */
declare const associateDataComponentWithAgent: (db: AgentsManageDatabaseClient) => (params: {
  scopes: SubAgentScopeConfig;
  dataComponentId: string;
}) => Promise<{
  id: string;
  createdAt: string;
  tenantId: string;
  projectId: string;
  agentId: string;
  subAgentId: string;
  dataComponentId: string;
}>;
/**
 * Remove association between data component and agent
 */
declare const removeDataComponentFromAgent: (db: AgentsManageDatabaseClient) => (params: {
  scopes: SubAgentScopeConfig;
  dataComponentId: string;
}) => Promise<boolean>;
declare const deleteAgentDataComponentRelationByAgent: (db: AgentsManageDatabaseClient) => (params: {
  scopes: SubAgentScopeConfig;
}) => Promise<boolean>;
/**
 * Get all agents that use a specific data component
 */
declare const getAgentsUsingDataComponent: (db: AgentsManageDatabaseClient) => (params: {
  scopes: ProjectScopeConfig;
  dataComponentId: string;
}) => Promise<{
  subAgentId: string;
  createdAt: string;
}[]>;
/**
 * Check if a data component is associated with an agent
 */
declare const isDataComponentAssociatedWithAgent: (db: AgentsManageDatabaseClient) => (params: {
  scopes: SubAgentScopeConfig;
  dataComponentId: string;
}) => Promise<boolean>;
/**
 * Upsert agent-data component relation (create if it doesn't exist, no-op if it does)
 */
declare const upsertAgentDataComponentRelation: (db: AgentsManageDatabaseClient) => (params: {
  scopes: SubAgentScopeConfig;
  dataComponentId: string;
}) => Promise<{
  id: string;
  createdAt: string;
  tenantId: string;
  projectId: string;
  agentId: string;
  subAgentId: string;
  dataComponentId: string;
} | null>;
/**
 * Count data components for a tenant/project
 */
declare const countDataComponents: (db: AgentsManageDatabaseClient) => (params: {
  scopes: ProjectScopeConfig;
}) => Promise<number>;
/**
 * Upsert a data component (create if it doesn't exist, update if it does)
 */
declare const upsertDataComponent: (db: AgentsManageDatabaseClient) => (params: {
  data: DataComponentInsert;
}) => Promise<DataComponentSelect | null>;
//#endregion
export { associateDataComponentWithAgent, countDataComponents, createDataComponent, deleteAgentDataComponentRelationByAgent, deleteDataComponent, getAgentsUsingDataComponent, getDataComponent, getDataComponentsForAgent, isDataComponentAssociatedWithAgent, listDataComponents, listDataComponentsPaginated, removeDataComponentFromAgent, updateDataComponent, upsertAgentDataComponentRelation, upsertDataComponent };