import { ReadonlySignal } from "@preact/signals-core"; import type { ApiError, ListDetail } from "@swishapp/api-client"; import type { SwishApp } from "../swish"; export type ListsType = "user" | "smart"; export interface ListsOptions { /** Which kinds of list to load. Defaults to both, user lists first. */ types?: ListsType[]; } export interface ListsState { lists: ListDetail[]; /** `true` during the first load only. */ loading: boolean; /** `true` while a later, event-driven fetch is in flight. */ refetching: boolean; error: ApiError | null; } export type ListsSignal = ReadonlySignal & { refresh: () => Promise; dispose: () => void; }; export declare const listsSignal: (swish: SwishApp) => (options?: ListsOptions) => ListsSignal;