/// type Button = TextButton | ImageButton; /** * @interface * The required UIStructure of Promptifier */ interface UIStructure { /** A Frame representing the background of the Prompt. */ bg: Frame; /** A TextLabel which will act as the title/header for this Prompt. */ title: TextLabel; /** A Frame | ScrollingFrame representing the container of the Prompt content. */ content: Frame | ScrollingFrame; /** The confirm, yes and accept button that will fulfill as accepted. */ acceptBtn: Button; /** The reject, no and decline button that will fulfill as declined. */ declineBtn: Button; } /** * **UIResolver** * * A utility class that allows you to patch any prompt designs into the Prompt class essentially * mapping your custom elements into the expected structure. */ declare class UIResolver { /** A Frame representing the background of the Prompt. */ BG: Frame; /** A TextLabel which will act as the title/header for this Prompt. */ Title: TextLabel; /** A Frame | ScrollingFrame representing the container of the Prompt content. */ Content: ScrollingFrame | Frame; /** The confirm, yes and accept button that will fulfill as accepted. */ AcceptBtn: Button; /** The reject, no and decline button that will fulfill as declined. */ DeclineBtn: Button; /** * Sets the background of this Prompt. * @param bg - The background Frame of the Prompt * @returns - UIResolver for chaining */ SetBG(bg: Frame): this; /** * Sets the title of this Prompt. * @param tl - The title TextLabel of the Prompt * @returns - UIResolver for chaining */ SetTitle(tl: TextLabel): this; /** * Sets the content of this Prompt. * @param frame - A ScrollingFrame or Frame that will contain the Prompt content * @returns - UIResolver for chaining */ SetContent(frame: ScrollingFrame | Frame): this; /** * Sets the accept button of this Prompt. * @param btn - The TextButton or ImageButton that will represent accepting the Prompt * @returns - UIResolver for chaining */ SetAccept(btn: Button): this; /** * Sets the decline button of this Prompt. * @param btn - The TextButton or ImageButton that will represent declining the Prompt * @returns - UIResolver for chaining */ SetDecline(btn: Button): this; /** * Reassigns the ZIndex of the Prompt UIResolver elements. */ ReassignZIndex(): void; /** * Resolves a structure of UI that is the required structure for Promptifier functionality. * This was designed to simplify the assignment when not chaining in roblox-ts. * @param structure The UIResolver required structure * @returns - A boolean indicating whether the structure is valid or not. */ Resolve(structure: UIStructure): boolean; /** * Validates the ui links to ensure they fill the requirements. * Errors if any of the elements are missing or invalid types. */ Validate(): void; /** * Validates the structure of the UIResolver ensuring the elements are within their background. * @returns - `true` if the structure is valid, otherwise `false` */ ValidateStructure(): boolean; } export { UIResolver, UIStructure };