import { Parser } from '../index.js'; import GuideSection from '../classes/GuideSection.js'; import GuideSubscriptionsSection from '../classes/GuideSubscriptionsSection.js'; import type { ObservedArray } from '../helpers.js'; import type { IGuideResponse } from '../types/index.js'; import type { IRawResponse } from '../index.js'; export default class Guide { #page: IGuideResponse; contents?: ObservedArray; constructor(data: IRawResponse) { this.#page = Parser.parseResponse(data); if (this.#page.items) this.contents = this.#page.items.array().as(GuideSection, GuideSubscriptionsSection); } get page(): IGuideResponse { return this.#page; } }