import type Database from 'better-sqlite3';
import type { BrokenReference, ChangedBy, DatabaseTable, DatabaseTableCreateInput, DatabaseTableDanglingFk, DatabaseTableDeleteResult, DatabaseTableListQuery, DatabaseTableUpdateInput } from '../../shared/entities.js';
import type { TagsService } from './tags.js';
import type { VersionService } from './versions.js';
export declare class DatabaseTableService {
    private db;
    private tags;
    private versions;
    constructor(db: Database.Database, tags: TagsService, versions: VersionService);
    create(input: DatabaseTableCreateInput, actor: ChangedBy): {
        dbTable: DatabaseTable;
        warnings: string[];
    };
    list(query?: DatabaseTableListQuery): DatabaseTable[];
    getBySlug(slug: string): DatabaseTable | null;
    getIdBySlug(slug: string): number | null;
    update(slug: string, input: DatabaseTableUpdateInput, actor: ChangedBy): {
        dbTable: DatabaseTable;
        previousSlug: string;
        warnings: string[];
    };
    remove(slug: string, actor: ChangedBy, brokenReferences?: BrokenReference[]): DatabaseTableDeleteResult;
    /**
     * Propagates a slug rename to every other database_table whose columns carry
     * an `fk.table === oldSlug`. Runs in a transaction and snapshots each
     * mutated row via VersionService for an auditable trail.
     */
    propagateFkSlugChange(oldSlug: string, newSlug: string, actor: ChangedBy): {
        changedTables: string[];
    };
    /** Tables whose columns carry `fk.table === targetSlug`. */
    findDanglingFks(targetSlug: string): DatabaseTableDanglingFk[];
    private getByIdInternal;
    private hydrate;
    private computeWarnings;
}
