import type Database from 'better-sqlite3';
import type { Ac, AcBrokenVerify, AcCreateInput, AcDeleteResult, AcListQuery, AcUpdateInput, AcVerifyRef, BrokenReference, ChangedBy } from '../../../shared/entities.js';
import type { TagsService } from '../../services/tags.js';
import type { VersionService } from '../../services/versions.js';
import type { PluginHost } from '../../core/plugin-host/types.js';
export interface AcCreateResult {
    ac: Ac;
}
export interface AcUpdateResult {
    ac: Ac;
    previousSlug: string;
}
export declare class AcService {
    private db;
    private tags;
    private versions;
    private host;
    constructor(db: Database.Database, tags: TagsService, versions: VersionService, host: PluginHost);
    create(input: AcCreateInput, actor: ChangedBy): Ac;
    list(query?: AcListQuery): Ac[];
    getBySlug(slug: string): Ac | null;
    getIdBySlug(slug: string): number | null;
    update(slug: string, input: AcUpdateInput, actor: ChangedBy): AcUpdateResult;
    /** Idempotent UPSERT for M17 restore. */
    upsert(slug: string, input: AcCreateInput, actor: ChangedBy): {
        ac: Ac;
        op: 'created' | 'updated';
    };
    remove(slug: string, actor: ChangedBy, brokenReferences?: BrokenReference[]): AcDeleteResult;
    /** Resolve verifies refs against the host; non-blocking. */
    classifyVerifies(verifies: AcVerifyRef[]): AcBrokenVerify[];
    private allocateSlug;
    private getByIdInternal;
    private hydrate;
}
