import { AutoEncoder } from '@simonbackx/simple-encoding'; import { Product } from './webshops/Product.js'; import { Webshop, WebshopPreview } from './webshops/Webshop.js'; export declare class SeatingSizeConfiguration { seatWidth: number; seatHeight: number; seatXSpacing: number; seatYSpacing: number; constructor(config?: Partial); } export declare enum SeatMarkings { DisabledPerson = "dp" } export declare enum SeatType { Seat = "s", Space = "sp" } type Size = { width: number; height: number; }; export declare class SeatingPlanSeat extends AutoEncoder { /** * Name of the seat. * E.g. '1' */ label: string; /** * id of the category of this seat */ category: string | null; /** * Default block width = 2, which equals 1 seat -> allow to jump in halves */ blockWidth: number; /** * Grow factor (automatically increase width of seat) */ grow: number; type: SeatType; markings: SeatMarkings[]; get isSpace(): boolean; get isValidSeat(): boolean; x: number; y: number; width: number; height: number; setPosition(x: number, y: number, width: number, height: number): void; uuid: string; } export declare class SeatingPlanRow extends AutoEncoder { /** * Name of the row * E.g. 'A' */ label: string; seats: SeatingPlanSeat[]; get seatCount(): number; getWidth(config: SeatingSizeConfiguration): number; getGrow(): number; x: number; y: number; height: number; width: number; setPosition(x: number, y: number, width: number, height: number): void; uuid: string; } export declare class SeatingPlanSection extends AutoEncoder { id: string; /** * Name of the section (optional if only section) */ name: string; rows: SeatingPlanRow[]; get seatCount(): number; calculateMinimumWidth(): number; correctSizeConfig(config: SeatingSizeConfiguration): void; calculateSize(config: SeatingSizeConfiguration): Size; updatePositions(config: SeatingSizeConfiguration): void; } export declare class SeatingPlanCategory extends AutoEncoder { /** * On creation, choose a short id, to reduce the size of the seating plan */ id: string; /** * Name of the category */ name: string; /** * Price added (can be negative) is always in cents, to avoid floating point errors */ price: number; /** * Only allow ordering by administrators */ adminOnly: boolean; } export declare class SeatingPlan extends AutoEncoder { id: string; /** * Name of the venue */ name: string; requireOptimalReservation: boolean; sections: SeatingPlanSection[]; categories: SeatingPlanCategory[]; get seatCount(): number; get adminSeatCount(): number; isAdminSeat(s: ReservedSeat): boolean; getSeat(s: ReservedSeat): SeatingPlanSeat | null; getCategoryName(seat: ReservedSeat): string | null; getCategoryColor(categoryId: any): string | undefined; getSeatColor(seat: SeatingPlanSeat): string | undefined; isValidSeat(s: ReservedSeat, reservedSeats?: ReservedSeat[], allowedSeats?: ReservedSeat[]): boolean; adjustSeatsForBetterFit(selectedSeats: ReservedSeat[], reservedSeats: ReservedSeat[], allowedSeats?: ReservedSeat[], asAdmin?: boolean): ReservedSeat[] | null; } export declare class ReservedSeat extends AutoEncoder { /** * Id of the section */ section: string; /** * label of the row */ row: string; /** * label of the seat */ seat: string; getName(webshop: Webshop | WebshopPreview, product: Product): { title: string; value: string; }[]; getNameString(webshop: Webshop | WebshopPreview, product: Product): string; getShortName(product: Product): string; equals(reservedSeat: ReservedSeat): boolean; static sort(a: ReservedSeat, b: ReservedSeat): 0 | 1 | -1; } export declare class CartReservedSeat extends ReservedSeat { /** * Additional price that was applied */ price: number; calculatePrice(seatingPlan: SeatingPlan): number; } export {}; //# sourceMappingURL=SeatingPlan.d.ts.map