import * as I from "../types/types"; import * as Communication from "./communication"; import { config } from "./config"; import * as Events from "./events"; import * as Panzoom from "./panzoom"; import * as CartButtons from "./cartButtons"; import Utils from "./utils"; export function setOptionSelect(inSeatmapListing: I.Seatmap[], inId: string): void { const seatmapDropdown: HTMLElement | null = document.getElementById(inId); if (seatmapDropdown) { for (let seatmapObj of inSeatmapListing) { const id: string = seatmapObj.id[0]; const desc: string = Utils.encodeCP850DecodeUTF8(seatmapObj.desc[0]); var opt: HTMLOptionElement = document.createElement('option'); opt.value = id; opt.innerHTML = desc; seatmapDropdown.appendChild(opt); } } } export function changeSiteTitle(): void { document.title += ` ${config.state.inputsWithValue?.supplier_code}`; } export function setEventInfo(inEventInfo: I.EventInfo): void { const inputsWithValue = config.state.inputsWithValue!; const desc: string = Utils.encodeCP850DecodeUTF8(inEventInfo.desc[0]); const location: string = inputsWithValue.venueLocation; jQuery("#eventInfoDesc span.fl-heading-text")[0].childNodes[0].textContent = desc; jQuery("#eventInfoLocation p")[0].childNodes[0].textContent = location; jQuery("#eventInfoDate p")[0].childNodes[0].textContent = inEventInfo.start[0]; jQuery("#eventInfoCapacity p")[0].childNodes[0].textContent = `Verfügbare Plätze: ${inEventInfo.seats_available} von ${inEventInfo.venue_config_capacity[0]}`; } export function createDialog(): void { const iframeHTML: string = "