import { JSXInterface } from '../jsx'; import { BasicElement, CSSResultGroup, PropertyValues, TemplateResult } from '@refinitiv-ui/core'; export { preload } from './utils/FlagLoader.js'; export declare class Flag extends BasicElement { /** * Element version number * @returns version number */ static get version(): string; /** * A `CSSResultGroup` that will be used * to style the host, slotted children * and the internal template of the element. * @returns CSS template */ static get styles(): CSSResultGroup; private _flag; /** * Code of a known flag to render or URL of flag SVG file. * @example gb | https://cdn.io/flags/gb.svg * @default null */ get flag(): string | null; set flag(value: string | null); private _template; /** * The flag template to render */ private get template(); private set template(value); /** * A deferred promise representing flag ready. * It would be resolved when the flag svg has been fetched and parsed, or * when the flag svg is unavailable/invalid. */ private flagReady; constructor(); /** * Called after the component is first rendered * @param changedProperties Properties which have changed * @returns {void} */ protected firstUpdated(changedProperties: PropertyValues): void; protected getUpdateComplete(): Promise; /** * instantiate a new deferred promise for flag ready if it's not pending already * @returns {void} */ private deferFlagReady; /** * Helper method, used to set the flag src. * @returns {void} */ private setFlagSrc; /** * Tries to load an flag from the url provided * and the renders this into the flag template. * @param src Source location of the svg flag. * @returns {void} */ private loadAndRenderFlag; /** * Get and cache CDN prefix * This is a private URL which is set in the theme * and should not be configured again via the variable. * @returns {void} */ private setPrefix; /** * Clears SVG body from the flag template * @returns {void} */ private clearFlag; /** * A `TemplateResult` that will be used * to render the updated internal template. * @return {TemplateResult} Render template */ protected render(): TemplateResult; } declare global { interface HTMLElementTagNameMap { 'ef-flag': Flag; } } declare global { interface HTMLElementTagNameMap { 'ef-flag': Flag; } namespace JSX { interface IntrinsicElements { 'ef-flag': Partial | JSXInterface.HTMLAttributes; } } } export {};