import { R as Runnable, M as MultiOptionsFn, S as SingleOptionsFn, a as Schedule, O as OptionsFn, T as Tag } from './schedule-VMlY28Yd.cjs';
export { e as Options, c as OptionsObject, b as Schedule, d as SingleOptionsObject } from './schedule-VMlY28Yd.cjs';

/**
 * An options function that schedules runnables before specified tags and runnables.
 *
 * @param ids - The ids to split into tags and runnables.
 * @return A function to schedule runnables before specified tags and runnables.
 */
declare function before<T extends Scheduler.Context = Scheduler.Context>(...ids: (symbol | string | Runnable<T>)[]): MultiOptionsFn<T>;
/**
 * An options function that schedules runnables after specified tags and runnables.
 *
 * @param ids - The ids to split into tags and runnables.
 * @return A function to schedule runnables after specified tags and runnables.
 */
declare function after<T extends Scheduler.Context = Scheduler.Context>(...ids: (symbol | string | Runnable<T>)[]): MultiOptionsFn<T>;
/**
 * An options function that sets the ID of a runnable in the schedule.
 *
 * @param id - The ID to be set for the runnable.
 * @return A function that sets the ID of a runnable in the schedule.
 */
declare function id<T extends Scheduler.Context = Scheduler.Context>(id: symbol | string): SingleOptionsFn<T>;
/**
 * An options function that applies a tag to a runnable based on the given id, symbol or runnable.
 *
 * @param id - The unique identifier of the tag to apply.
 * @return A function that applies the tag to the provided runnable.
 */
declare function tag<T extends Scheduler.Context = Scheduler.Context>(id: symbol | string): MultiOptionsFn<T>;
/**
 * Creates a new Schedule object with an empty DirectedGraph,
 * a new Map for tags, and a new Map for symbols.
 *
 * @return The newly created Schedule object.
 */
declare function create<T extends Scheduler.Context = Scheduler.Context>(): Schedule<T>;
/**
 * Executes all the runnables in the given schedule with the provided context.
 *
 * @param schedule - The schedule containing the runnables to execute.
 * @param context - The context to be passed to each runnable.
 */
declare function run<T extends Scheduler.Context = Scheduler.Context>(schedule: Schedule<T>, context: T): Promise<void>;
/**
 * Removes a tag from the given schedule by its ID.
 *
 * @param schedule - The schedule from which to remove the tag.
 * @param id - The ID of the tag to remove.
 * @return This function does not return anything.
 */
declare function removeTag<T extends Scheduler.Context = Scheduler.Context>(schedule: Schedule<T>, id: symbol | string): void;
/**
 * Checks if a tag with the given ID exists in the schedule.
 *
 * @param schedule - The schedule to check.
 * @param id - The ID of the tag to check.
 * @return Returns true if the tag exists, false otherwise.
 */
declare function hasTag<T extends Scheduler.Context = Scheduler.Context>(schedule: Schedule<T>, id: symbol | string): boolean;
/**
 * Creates a new tag for the given schedule with the provided ID, name, and options.
 *
 * @param schedule - The schedule to create the tag for.
 * @param id - The unique identifier for the tag.
 * @param name - The name of the tag.
 * @param options - Additional options to customize the tag.
 * @return The newly created tag.
 */
declare function createTag<T extends Scheduler.Context = Scheduler.Context>(schedule: Schedule<T>, id: symbol | string, ...options: OptionsFn<T>[]): Tag;
/**
 * Adds a runnable to the schedule and applies options to it.  The schedule must be built after a runnable is added.
 *
 * @param schedule - The schedule to add the runnable to.
 * @param runnable - The runnable or array of runnables to add to the schedule.
 * @param options - The options to apply to the runnable. ID can not be used if runnable is an array.
 * @throws If the runnable already exists in the schedule.
 * @return
 */
declare function add<T extends Scheduler.Context = Scheduler.Context, R extends Runnable<T> | Runnable<T>[] = Runnable<T> | Runnable<T>[]>(schedule: Schedule<T>, runnable: R, ...options: R extends Runnable<T> ? SingleOptionsFn<T>[] : MultiOptionsFn<T>[]): void;
/**
 * Checks if the given runnable exists in the schedule.
 *
 * @param schedule - The schedule to check.
 * @param runnable - The runnable to check.
 * @return Returns true if the runnable exists, false otherwise.
 */
declare function has<T extends Scheduler.Context = Scheduler.Context>(schedule: Schedule<T>, runnable: Runnable<T>): boolean;
/**
 * Builds the schedule by performing a topological sort on the directed graph.
 *
 * @param schedule - The schedule to be built.
 * @return This function does not return anything.
 */
declare function build<T extends Scheduler.Context = Scheduler.Context>(schedule: Schedule<T>): void;
/**
 * Removes a runnable from the given schedule.
 *
 * @param schedule - The schedule from which to remove the runnable.
 * @param runnable - The runnable to remove from the schedule.
 * @return This function does not return anything.
 */
declare function remove<T extends Scheduler.Context = Scheduler.Context>(schedule: Schedule<T>, runnable: Runnable<T>): void;
/**
 * Retrieves a runnable from the schedule based on the given ID.
 *
 * @param schedule - The schedule to retrieve the runnable from.
 * @param id - The ID of the runnable to retrieve.
 * @return The retrieved runnable or undefined if not found.
 */
declare function getRunnable<T extends Scheduler.Context = Scheduler.Context>(schedule: Schedule<T>, id: symbol | string): Runnable<T> | undefined;
/**
 * Retrieves a tag from the given schedule based on the provided ID.
 *
 * @param schedule - The schedule to retrieve the tag from.
 * @param id - The ID of the tag to retrieve.
 * @return The retrieved tag or undefined if not found.
 */
declare function getTag<T extends Scheduler.Context = Scheduler.Context>(schedule: Schedule<T>, id: symbol | string): Tag<T> | undefined;
/**
 * Prints an ASCII visualization of the directed acyclic graph (DAG) in the given schedule.
 *
 * @param schedule - The schedule containing the DAG to visualize.
 * @return This function does not return anything.
 */
declare function debug<T extends Scheduler.Context = Scheduler.Context>(schedule: Schedule<T>): void;

export { MultiOptionsFn, OptionsFn, Runnable, SingleOptionsFn, Tag, add, after, before, build, create, createTag, debug, getRunnable, getTag, has, hasTag, id, remove, removeTag, run, tag };
