| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081 |
- // @ts-check
- // Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
- // This file is automatically generated. DO NOT EDIT
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
- // @ts-ignore: Unused imports
- import { Create as $Create } from "@wailsio/runtime";
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
- // @ts-ignore: Unused imports
- import * as color$0 from "../../../../../../../image/color/models.js";
- /**
- * BadgeOptions represents options for customizing badge appearance
- */
- export class BadgeOptions {
- /**
- * Creates a new BadgeOptions instance.
- * @param {Partial<BadgeOptions>} [$$source = {}] - The source object to create the BadgeOptions.
- */
- constructor($$source = {}) {
- if (!("TextColour" in $$source)) {
- /**
- * @member
- * @type {color$0.RGBA}
- */
- this["TextColour"] = (new color$0.RGBA());
- }
- if (!("BackgroundColour" in $$source)) {
- /**
- * @member
- * @type {color$0.RGBA}
- */
- this["BackgroundColour"] = (new color$0.RGBA());
- }
- if (!("FontName" in $$source)) {
- /**
- * @member
- * @type {string}
- */
- this["FontName"] = "";
- }
- if (!("FontSize" in $$source)) {
- /**
- * @member
- * @type {number}
- */
- this["FontSize"] = 0;
- }
- if (!("SmallFontSize" in $$source)) {
- /**
- * @member
- * @type {number}
- */
- this["SmallFontSize"] = 0;
- }
- Object.assign(this, $$source);
- }
- /**
- * Creates a new BadgeOptions instance from a string or object.
- * @param {any} [$$source = {}]
- * @returns {BadgeOptions}
- */
- static createFrom($$source = {}) {
- const $$createField0_0 = $$createType0;
- const $$createField1_0 = $$createType0;
- let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
- if ("TextColour" in $$parsedSource) {
- $$parsedSource["TextColour"] = $$createField0_0($$parsedSource["TextColour"]);
- }
- if ("BackgroundColour" in $$parsedSource) {
- $$parsedSource["BackgroundColour"] = $$createField1_0($$parsedSource["BackgroundColour"]);
- }
- return new BadgeOptions(/** @type {Partial<BadgeOptions>} */($$parsedSource));
- }
- }
- // Private type creation functions
- const $$createType0 = color$0.RGBA.createFrom;
|