import { ActivityInterface as ActivityInterface$1, CommitmentInterface as CommitmentInterface$1, LocationInterface as LocationInterface$1, MapInterface as MapInterface$1, RoomInterface as RoomInterface$1 } from '@drincs/nqtr';
import { CharacterInterface, StoredClassModel } from '@drincs/pixi-vn';
import { O as OnRunAsyncFunction, E as ExecutionType } from './StageInterface-C1Zfcpk3.mjs';

interface DateSchedulingInterface {
    /**
     * The start date. If the item hasn't started yet, it will be hidden.
     * If you set it to 3, the item will be hidden on dates 1 and 2 and will be shown starting on date 3.
     */
    from: number;
    /**
     * The date when the item ends. If the item is ended yet, it will be deleted or hidden.
     * If you set { from: 0, to: 3 }, the item will be shown into dates 1 and 2 and will be deleted or hidden from date 3.
     * @default undefined
     */
    to?: number;
}

interface TimeSchedulingInterface {
    /**
     * The time when the item starts. If the item is not started yet, it will be hidden.
     * If you set 3, the item will be hidden into times 1 and 2, and will be shown from time 3.
     */
    from: number;
    /**
     * The time when the item ends. If the item is ended yet, it will be hidden.
     * If you set 3, the item will be shown into times 1 and 2 and will be hidden from time 3.
     * @default timeTracker.dayEndTime + 1
     */
    to?: number;
}

interface ActivityInterface extends ActivityBaseInternalInterface, ActivityInterface$1 {
}
interface ActivityBaseInternalInterface {
    /**
     * The id of the activity/commitment.
     */
    readonly id: string;
    /**
     * Time slot in which activity/commitment will be active.
     */
    readonly timeSlot: TimeSchedulingInterface | undefined;
    /**
     * Used to schedule what date it will be added and removed.
     */
    readonly dateScheduling: DateSchedulingInterface | undefined;
    /**
     * The function that is called when the activity/commitment is runned.
     */
    readonly run: OnRunAsyncFunction;
    /**
     * Whether the activity/commitment is a deadline, so it will then be removed or hidden.
     *
     * It **depends only on the date**, not the time. So if you set { dateScheduling: { from: 0, to: 3 }, timeSlot { from: 10, to: 20 } } the activity/commitment hidden or deleted on date 3 at 0.
     */
    readonly expired: boolean;
    /**
     * Whether the activity/commitment is active.
     */
    readonly isActive: boolean;
}

interface CommitmentInterface extends CommitmentBaseInternalInterface, CommitmentInterface$1 {
}
interface CommitmentBaseInternalInterface extends ActivityBaseInternalInterface {
    /**
     * The character or characters that are in the commitment and so in the room.
     */
    readonly characters: CharacterInterface[];
    /**
     * The room where the commitment is.
     */
    readonly room: RoomInterface;
    /**
     * Execution type. If is "automatic" the onRun() runned automatically when the palayer is in the room. If is "interaction" the player must interact with the character to run the onRun() function.
     * If you set "automatic" remember to remove the commitment when it is no longer needed, because otherwise it repeats itself every time.
     */
    executionType: ExecutionType;
    /**
     * The priority. The higher the number, the higher the priority.
     * To ensure that a character is not in 2 places at the same time, if there are 2 or more valid commits at the same time and with the same character, the one with the highest priority will be chosen.
     */
    priority: number;
}

interface NavigationAbstractInterface extends StoredClassModel {
    /**
     * Connects the activity to the class.
     * @param activity The activity to connect to the class.
     * @param options
     * @returns
     */
    addActivity(activity: ActivityInterface, options?: {
        /**
         * Time slot in which activity will be active.
         */
        timeSlot?: TimeSchedulingInterface;
        /**
         * Used to schedule what date it will be added and removed.
         */
        dateScheduling?: DateSchedulingInterface;
    }): void;
    /**
     * Disconnects the activity from the class.
     * @param activity The activity to disconnect from the class.
     * @param options
     */
    removeActivity(activity: ActivityInterface | string, options?: Pick<DateSchedulingInterface, "to">): void;
    /**
     * Removes the useless activities.
     */
    clearExpiredActivities(): void;
    /**
     * All the ids of the activities associated with this class. Compared to {@link activities}, they are not filtered based on their scheduling.
     */
    readonly activitiesIds: string[];
    /**
     * The activities associated with this class, filtered based on their scheduling.
     */
    activities: ActivityInterface[];
}

interface LocationInterface extends LocationInternalInterface, LocationInterface$1 {
}
interface LocationInternalInterface extends NavigationAbstractInterface {
    /**
     * The id of the location.
     */
    readonly id: string;
    /**
     * The map where the location is.
     */
    readonly map: MapInterface;
    /**
     * Get all rooms in the location.
     * @returns The rooms in the location.
     */
    readonly rooms: RoomInterface[];
}

interface MapInterface extends MapBaseInternalInterface, MapInterface$1 {
}
interface MapBaseInternalInterface extends NavigationAbstractInterface {
    /**
     * The id of the map.
     */
    readonly id: string;
    /**
     * Get all locations in the map.
     * @returns The locations in the map.
     */
    readonly locations: LocationInterface[];
}

interface RoomInterface extends RoomBaseInternalInterface, RoomInterface$1 {
}
interface RoomBaseInternalInterface extends NavigationAbstractInterface {
    /**
     * The id of the room.
     */
    readonly id: string;
    /**
     * The location where the room is.
     */
    readonly location: LocationInterface;
    /**
     * Get the character commitments of the room.
     */
    readonly routine: CommitmentInterface[];
    /**
     * Get the characters in the room.
     */
    readonly characters: CharacterInterface[];
    /**
     * Get the functions that will be executed when the room is visited.
     */
    readonly automaticFunctions: OnRunAsyncFunction[];
}

export type { ActivityInterface as A, CommitmentInterface as C, DateSchedulingInterface as D, LocationInterface as L, MapInterface as M, NavigationAbstractInterface as N, RoomInterface as R, TimeSchedulingInterface as T, ActivityBaseInternalInterface as a, CommitmentBaseInternalInterface as b, LocationInternalInterface as c, MapBaseInternalInterface as d, RoomBaseInternalInterface as e };
