import { SqliteActor } from "@sqlite-actor/core";
import { SQLITE_VEC_WASM_BASE64 } from "./wasm_binary.js";
/**
 * An adapter for the core SqliteActor that comes pre-bundled with
 * the sqlite-vec extension and its required WASM binary.
 */
export class SqliteVec extends SqliteActor {
    /**
     * Creates and initializes a new SqliteVec instance using the provided KV storage.
     *
     * @param kv The KV storage implementation (e.g., Durable Objects storage).
     * @param options Optional configuration for the SQLite instance.
     * @returns A Promise that resolves to a fully initialized SqliteVec instance.
     */
    static async create(kv, options) {
        const db = new SqliteVec(kv, options?.pageSize);
        const { default: initSqlite3 } = await import("./sqlite-vec.js");
        await db.init(initSqlite3, {
            ...options,
            wasmBinaryString: options?.wasmBinaryString || SQLITE_VEC_WASM_BASE64
        });
        return db;
    }
}
export default SQLITE_VEC_WASM_BASE64;
