import { isArrayLike } from "../util/isArrayLike.mjs";
import { isPromise } from "../util/isPromise.mjs";
import { isInteropObservable } from "../util/isInteropObservable.mjs";
import { isAsyncIterable } from "../util/isAsyncIterable.mjs";
import { createInvalidObservableTypeError } from "../util/throwUnobservableError.mjs";
import { isIterable } from "../util/isIterable.mjs";
import { isReadableStreamLike } from "../util/isReadableStreamLike.mjs";
import { scheduleObservable } from "./scheduleObservable.mjs";
import { schedulePromise } from "./schedulePromise.mjs";
import { scheduleArray } from "./scheduleArray.mjs";
import { scheduleIterable } from "./scheduleIterable.mjs";
import { scheduleAsyncIterable } from "./scheduleAsyncIterable.mjs";
import { scheduleReadableStreamLike } from "./scheduleReadableStreamLike.mjs";

//#region ../../node_modules/.pnpm/rxjs@7.8.2/node_modules/rxjs/dist/esm5/internal/scheduled/scheduled.js
function scheduled(input, scheduler) {
	if (input != null) {
		if (isInteropObservable(input)) return scheduleObservable(input, scheduler);
		if (isArrayLike(input)) return scheduleArray(input, scheduler);
		if (isPromise(input)) return schedulePromise(input, scheduler);
		if (isAsyncIterable(input)) return scheduleAsyncIterable(input, scheduler);
		if (isIterable(input)) return scheduleIterable(input, scheduler);
		if (isReadableStreamLike(input)) return scheduleReadableStreamLike(input, scheduler);
	}
	throw createInvalidObservableTypeError(input);
}

//#endregion
export { scheduled };
//# sourceMappingURL=scheduled.mjs.map