
if(typeof window !== 'undefined') {	
	if (!window['Smart']) {
		window['Smart'] = { RenderMode: 'manual' };
	}
	else {
		window['Smart'].RenderMode = 'manual';
	}
}
import './../source/modules/smart.array';

import { __awaiter } from 'tslib';
import * as i0 from '@angular/core';
import { EventEmitter, Directive, Output, Input, NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';

class BaseElement {
    constructor(ref) {
        this.onCreate = new EventEmitter();
        this.onReady = new EventEmitter();
        this.onAttach = new EventEmitter();
        this.onDetach = new EventEmitter();
        const that = this;
        this.nativeElement = ref.nativeElement;
        that.nativeElement.onAttached = () => {
            that.onAttach.emit(that.nativeElement);
        };
        that.nativeElement.onDetached = () => {
            that.onDetach.emit(that.nativeElement);
        };
    }
    addEventListener(type, listener, options = false) {
        this.nativeElement.addEventListener(type, listener, options);
    }
    removeEventListener(type, listener, options = false) {
        this.nativeElement.removeEventListener(type, listener, options);
    }
    dispatchEvent(event) {
        return this.nativeElement.dispatchEvent(event);
    }
    blur() {
        this.nativeElement.blur();
    }
    click() {
        this.nativeElement.click();
    }
    focus(options) {
        this.nativeElement.focus(options);
    }
    /** @description Sets or gets the license.  */
    get license() {
        return this.nativeElement ? this.nativeElement.license : undefined;
    }
    set license(value) {
        this.nativeElement ? this.nativeElement.license = value : undefined;
    }
    /** @description Sets or gets the language. Used in conjunction with the property messages.  */
    get locale() {
        return this.nativeElement ? this.nativeElement.locale : undefined;
    }
    set locale(value) {
        this.nativeElement ? this.nativeElement.locale = value : undefined;
    }
    /** @description Callback used to customize the format of the messages that are returned from the Localization Module. */
    get localizeFormatFunction() {
        return this.nativeElement ? this.nativeElement.localizeFormatFunction : undefined;
    }
    set localizeFormatFunction(value) {
        this.nativeElement ? this.nativeElement.localizeFormatFunction = value : undefined;
    }
    /** @description Sets or gets an object specifying strings used in the widget that can be localized. Used in conjunction with the property locale.  */
    get messages() {
        return this.nativeElement ? this.nativeElement.messages : undefined;
    }
    set messages(value) {
        this.nativeElement ? this.nativeElement.messages = value : undefined;
    }
    /** @description Sets or gets the value indicating whether the element is aligned to support locales using right-to-left fonts. */
    get rightToLeft() {
        return this.nativeElement ? this.nativeElement.rightToLeft : undefined;
    }
    set rightToLeft(value) {
        this.nativeElement ? this.nativeElement.rightToLeft = value : undefined;
    }
    /** @description Determines the theme. Theme defines the look of the element */
    get theme() {
        return this.nativeElement ? this.nativeElement.theme : undefined;
    }
    set theme(value) {
        this.nativeElement ? this.nativeElement.theme = value : undefined;
    }
}
BaseElement.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: BaseElement, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
BaseElement.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.6", type: BaseElement, inputs: { license: "license", locale: "locale", localizeFormatFunction: "localizeFormatFunction", messages: "messages", rightToLeft: "rightToLeft", theme: "theme" }, outputs: { onCreate: "onCreate", onReady: "onReady", onAttach: "onAttach", onDetach: "onDetach" }, ngImport: i0 });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: BaseElement, decorators: [{
            type: Directive
        }], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { onCreate: [{
                type: Output
            }], onReady: [{
                type: Output
            }], onAttach: [{
                type: Output
            }], onDetach: [{
                type: Output
            }], license: [{
                type: Input
            }], locale: [{
                type: Input
            }], localizeFormatFunction: [{
                type: Input
            }], messages: [{
                type: Input
            }], rightToLeft: [{
                type: Input
            }], theme: [{
                type: Input
            }] } });
let Smart;
if (typeof window !== "undefined") {
    Smart = window.Smart;
}

class ArrayComponent extends BaseElement {
    constructor(ref) {
        super(ref);
        this.eventHandlers = [];
        /** @description This event is triggered whenever a visible row or column is either added to or removed from the data grid. It fires after the row or column becomes visible to the user, enabling developers to perform actions such as updating UI elements, recalculating layout, or synchronizing data in response to changes in the grid’s visible structure."
        *  @param event. The custom event. 	*/
        this.onArraySizeChange = new EventEmitter();
        /** @description This event is triggered whenever the contents of the Array are modified. Changes can include adding or removing elements, updating existing values, or replacing the entire Array. The event allows you to respond dynamically to any updates made to the Array's data.
        *  @param event. The custom event. 	*/
        this.onChange = new EventEmitter();
        /** @description This event is triggered whenever a dimension is either added to or removed from the system. It provides a notification that the set of dimensions has changed, allowing you to respond accordingly, such as updating the user interface or reprocessing related data.
        *  @param event. The custom event. 	*/
        this.onDimensionChange = new EventEmitter();
        /** @description This event is triggered whenever a user clicks on a specific element within the Array. It allows you to execute custom logic in response to the user's selection of an individual Array item. The event provides context about which element was clicked, enabling dynamic interactions based on the selected item.
        *  @param event. The custom event. 	*/
        this.onElementClick = new EventEmitter();
        /** @description This event is triggered whenever the user scrolls the Array component using either the horizontal or vertical scrollbar. It activates in response to any scrollbar movement, allowing you to track or respond to changes in the visible portion of the Array.
        *  @param event. The custom event. 	*/
        this.onScroll = new EventEmitter();
        /** @description This event is triggered whenever there is a change to either a column’s width or a row’s height within the grid. It fires immediately after the user or an automated process resizes a column or row, allowing you to respond to layout adjustments or update related UI elements accordingly.
        *  @param event. The custom event. 	*/
        this.onSizeChange = new EventEmitter();
        this.nativeElement = ref.nativeElement;
    }
    /** @description Creates the component on demand.
     * @param properties An optional object of properties, which will be added to the template binded ones.
     */
    createComponent(properties = {}) {
        this.nativeElement = document.createElement('smart-array');
        for (let propertyName in properties) {
            this.nativeElement[propertyName] = properties[propertyName];
        }
        return this.nativeElement;
    }
    /** @description Specifies or retrieves the current animation mode. When this property is set to 'none', all animation effects are disabled; no transitions or animated elements will occur. Use this property to enable, disable, or customize animation behaviors within the application. */
    get animation() {
        return this.nativeElement ? this.nativeElement.animation : undefined;
    }
    set animation(value) {
        this.nativeElement ? this.nativeElement.animation = value : undefined;
    }
    /** @description Sets or retrieves the indexing mode used by the Array, determining how elements are accessed and referenced (e.g., zero-based, one-based, or custom indexing). This property controls whether the Array's indices start at zero, one, or another defined value, affecting how elements are read and assigned. */
    get arrayIndexingMode() {
        return this.nativeElement ? this.nativeElement.arrayIndexingMode : undefined;
    }
    set arrayIndexingMode(value) {
        this.nativeElement ? this.nativeElement.arrayIndexingMode = value : undefined;
    }
    /** @description A callback function that is triggered whenever the width, height, or disabled properties of the inner element require an update. This function is only used when the type property is set to 'custom'. The callback receives the updated values, allowing you to perform custom handling or side effects based on these property changes. */
    get changeProperty() {
        return this.nativeElement ? this.nativeElement.changeProperty : undefined;
    }
    set changeProperty(value) {
        this.nativeElement ? this.nativeElement.changeProperty = value : undefined;
    }
    /** @description Specifies or retrieves the total number of columns currently visible in the Array. When set, this determines how many columns are displayed to the user; when accessed, it returns the current count of visible columns. */
    get columns() {
        return this.nativeElement ? this.nativeElement.columns : undefined;
    }
    set columns(value) {
        this.nativeElement ? this.nativeElement.columns = value : undefined;
    }
    /** @description Defines or retrieves the default value assigned to inner elements when the type property is set to 'custom'. This property allows you to specify or access the initial value that inner elements will use or display when working with custom components. */
    get customWidgetDefaultValue() {
        return this.nativeElement ? this.nativeElement.customWidgetDefaultValue : undefined;
    }
    set customWidgetDefaultValue(value) {
        this.nativeElement ? this.nativeElement.customWidgetDefaultValue = value : undefined;
    }
    /** @description Specifies or retrieves the number of dimensions (also known as the rank) of the Array, indicating how many levels of indices are required to access its elements. */
    get dimensions() {
        return this.nativeElement ? this.nativeElement.dimensions : undefined;
    }
    set dimensions(value) {
        this.nativeElement ? this.nativeElement.dimensions = value : undefined;
    }
    /** @description Sets or retrieves the disabled state of the Array, indicating whether the Array is interactive or inactive. When set to true, all user interactions with the Array are prevented. When false, normal operations are enabled. */
    get disabled() {
        return this.nativeElement ? this.nativeElement.disabled : undefined;
    }
    set disabled(value) {
        this.nativeElement ? this.nativeElement.disabled = value : undefined;
    }
    /** @description Defines or retrieves the height, in pixels, assigned to each element (row) within the Array. This property allows you to specify or access the vertical size of individual rows. */
    get elementHeight() {
        return this.nativeElement ? this.nativeElement.elementHeight : undefined;
    }
    set elementHeight(value) {
        this.nativeElement ? this.nativeElement.elementHeight = value : undefined;
    }
    /** @description A callback function designed for configuring settings on element widgets. When the type property is set to 'custom', this callback must also handle the initialization of the widgets, as they will not be initialized automatically. Use this function to apply custom logic or settings during the creation and setup of your widgets. */
    get elementTemplate() {
        return this.nativeElement ? this.nativeElement.elementTemplate : undefined;
    }
    set elementTemplate(value) {
        this.nativeElement ? this.nativeElement.elementTemplate = value : undefined;
    }
    /** @description Specifies or retrieves the width, in pixels, assigned to each element (or column) within the Array. This determines the horizontal space allocated for displaying each column's contents. */
    get elementWidth() {
        return this.nativeElement ? this.nativeElement.elementWidth : undefined;
    }
    set elementWidth(value) {
        this.nativeElement ? this.nativeElement.elementWidth = value : undefined;
    }
    /** @description A callback function invoked to retrieve the current value of an element widget. This function is typically used to access or extract the widget’s state or input data, and can be customized to handle different types of widgets as needed. */
    get getElementValue() {
        return this.nativeElement ? this.nativeElement.getElementValue : undefined;
    }
    set getElementValue(value) {
        this.nativeElement ? this.nativeElement.getElementValue = value : undefined;
    }
    /** @description Sets or retrieves the height value for indexer elements. When a value is specified, it updates the height property of the indexers; when accessed without a value, it returns the current height setting for those indexers. */
    get indexerHeight() {
        return this.nativeElement ? this.nativeElement.indexerHeight : undefined;
    }
    set indexerHeight(value) {
        this.nativeElement ? this.nativeElement.indexerHeight = value : undefined;
    }
    /** @description Defines or retrieves the width (in pixels or other CSS units) of indexer elements, allowing you to control or access the display width of these components programmatically. */
    get indexerWidth() {
        return this.nativeElement ? this.nativeElement.indexerWidth : undefined;
    }
    set indexerWidth(value) {
        this.nativeElement ? this.nativeElement.indexerWidth = value : undefined;
    }
    /** @description Gets or sets the unlockKey property, which serves as the authentication key required to access or activate the product. */
    get unlockKey() {
        return this.nativeElement ? this.nativeElement.unlockKey : undefined;
    }
    set unlockKey(value) {
        this.nativeElement ? this.nativeElement.unlockKey = value : undefined;
    }
    /** @description Specifies or retrieves the current language code (e.g., "en", "fr", "es") to be used for translations. This setting works together with the messages property, which contains localized message data for each supported language. Changing the language will determine which set of messages is displayed or accessed. */
    get locale() {
        return this.nativeElement ? this.nativeElement.locale : undefined;
    }
    set locale(value) {
        this.nativeElement ? this.nativeElement.locale = value : undefined;
    }
    /** @description Callback function associated with the localization module, typically used to handle localization events or to process localization-related data (such as language changes, translations, or region-specific settings) within the application. */
    get localizeFormatFunction() {
        return this.nativeElement ? this.nativeElement.localizeFormatFunction : undefined;
    }
    set localizeFormatFunction(value) {
        this.nativeElement ? this.nativeElement.localizeFormatFunction = value : undefined;
    }
    /** @description Defines or retrieves an object containing key-value pairs of user interface text strings that can be localized for different languages. This property works with the locale property to dynamically display the widget's labels, messages, buttons, and other text elements in the selected language. Use this property to provide custom translations and ensure a consistent multilingual experience for users. */
    get messages() {
        return this.nativeElement ? this.nativeElement.messages : undefined;
    }
    set messages(value) {
        this.nativeElement ? this.nativeElement.messages = value : undefined;
    }
    /** @description If the element has the "readonly" attribute applied, users are unable to modify its value. However, they can still focus on the element and select its content. Unlike the "disabled" attribute, a readonly element remains functional for copying or submitting data, but it does not allow direct editing by the user. */
    get readonly() {
        return this.nativeElement ? this.nativeElement.readonly : undefined;
    }
    set readonly(value) {
        this.nativeElement ? this.nativeElement.readonly = value : undefined;
    }
    /** @description Specifies or retrieves the number of rows displayed at one time within the Array, determining how many items are visible to the user without scrolling. */
    get rows() {
        return this.nativeElement ? this.nativeElement.rows : undefined;
    }
    set rows(value) {
        this.nativeElement ? this.nativeElement.rows = value : undefined;
    }
    /** @description A callback function that allows you to programmatically set or update the value of element widgets. This function is typically invoked when the widget's value needs to be changed in response to user interactions or other application logic, enabling dynamic and flexible control over the widget's displayed content. */
    get setElementValue() {
        return this.nativeElement ? this.nativeElement.setElementValue : undefined;
    }
    set setElementValue(value) {
        this.nativeElement ? this.nativeElement.setElementValue = value : undefined;
    }
    /** @description Determines whether the horizontal scrollbar is visible. When set to true, the horizontal scrollbar will be displayed if the content overflows horizontally; when set to false, the scrollbar will be hidden, regardless of content overflow. This property can be used to programmatically enable or disable horizontal scrolling. */
    get showHorizontalScrollbar() {
        return this.nativeElement ? this.nativeElement.showHorizontalScrollbar : undefined;
    }
    set showHorizontalScrollbar(value) {
        this.nativeElement ? this.nativeElement.showHorizontalScrollbar = value : undefined;
    }
    /** @description Sets or retrieves a value that determines whether array indexers (e.g., [0], [1], [2]) are displayed alongside array elements. When enabled, the array index for each item will be shown in the user interface or output, providing clearer identification of array positions. */
    get showIndexDisplay() {
        return this.nativeElement ? this.nativeElement.showIndexDisplay : undefined;
    }
    set showIndexDisplay(value) {
        this.nativeElement ? this.nativeElement.showIndexDisplay = value : undefined;
    }
    /** @description Controls whether selected elements are visually highlighted. When set, selected elements will display a highlight to indicate their selection status. Can be used to enable or disable this visual feedback. */
    get showSelection() {
        return this.nativeElement ? this.nativeElement.showSelection : undefined;
    }
    set showSelection(value) {
        this.nativeElement ? this.nativeElement.showSelection = value : undefined;
    }
    /** @description Determines whether the vertical scrollbar is visible. When set, this property controls the display of the vertical scrollbar within the element. When retrieved, it returns the current visibility state of the vertical scrollbar. */
    get showVerticalScrollbar() {
        return this.nativeElement ? this.nativeElement.showVerticalScrollbar : undefined;
    }
    set showVerticalScrollbar(value) {
        this.nativeElement ? this.nativeElement.showVerticalScrollbar = value : undefined;
    }
    /** @description Specifies the theme to be applied to the element. The selected theme controls the visual appearance, including colors, fonts, and styling, ensuring a consistent look and feel across the component. */
    get theme() {
        return this.nativeElement ? this.nativeElement.theme : undefined;
    }
    set theme(value) {
        this.nativeElement ? this.nativeElement.theme = value : undefined;
    }
    /** @description Configures or retrieves the data type and the specific widget components assigned to each element within the Array. This determines how the array’s values are stored and how individual items are rendered and interacted with in the user interface. */
    get type() {
        return this.nativeElement ? this.nativeElement.type : undefined;
    }
    set type(value) {
        this.nativeElement ? this.nativeElement.type = value : undefined;
    }
    /** @description If set to true, the element will be excluded from the page’s tab order and cannot receive focus via keyboard navigation or mouse interaction. */
    get unfocusable() {
        return this.nativeElement ? this.nativeElement.unfocusable : undefined;
    }
    set unfocusable(value) {
        this.nativeElement ? this.nativeElement.unfocusable = value : undefined;
    }
    /** @description Allows you to retrieve the current value of the array or assign a new value to it. When setting the value, the existing contents of the array will be replaced with the new array provided. When getting the value, it returns the current array contents. */
    get value() {
        return this.nativeElement ? this.nativeElement.value : undefined;
    }
    set value(value) {
        this.nativeElement ? this.nativeElement.value = value : undefined;
    }
    /** @description Enhances the array by adding a new dimension. Note: If you need to add multiple dimensions at once, it is best to dynamically configure the dimensions property to specify all desired dimensions in a single operation. This approach ensures consistency and optimizes performance when modifying the array's structure.
    */
    addDimension() {
        if (this.nativeElement.isRendered) {
            this.nativeElement.addDimension();
        }
        else {
            this.nativeElement.whenRendered(() => {
                this.nativeElement.addDimension();
            });
        }
    }
    /** @description Removes any currently selected items or text, resulting in no active selection. This action resets the selection state to empty.
    */
    clearSelection() {
        if (this.nativeElement.isRendered) {
            this.nativeElement.clearSelection();
        }
        else {
            this.nativeElement.whenRendered(() => {
                this.nativeElement.clearSelection();
            });
        }
    }
    /** @description Copies the value of a specified array element to the user's clipboard, enabling easy sharing or pasting of the selected data elsewhere.
    * @param {number} Rowvisibleindex. The visible index of the row (y coordinate) of the element.
    * @param {number} Columnvisibleindex. The visible index of the column (x coordinate) of the element.
    */
    copyElementValueToClipboard(Rowvisibleindex, Columnvisibleindex) {
        if (this.nativeElement.isRendered) {
            this.nativeElement.copyElementValueToClipboard(Rowvisibleindex, Columnvisibleindex);
        }
        else {
            this.nativeElement.whenRendered(() => {
                this.nativeElement.copyElementValueToClipboard(Rowvisibleindex, Columnvisibleindex);
            });
        }
    }
    /** @description Removes a specified column from the value array, eliminating all data contained in that column across every row.
    * @param {number} Columnindex. Index of the column to be deleted.
    */
    deleteColumn(Columnindex) {
        if (this.nativeElement.isRendered) {
            this.nativeElement.deleteColumn(Columnindex);
        }
        else {
            this.nativeElement.whenRendered(() => {
                this.nativeElement.deleteColumn(Columnindex);
            });
        }
    }
    /** @description Removes a specific row from the value array, effectively deleting that element and shifting subsequent elements to maintain array order.
    * @param {number} Rowindex. Index of the row to be deleted.
    */
    deleteRow(Rowindex) {
        if (this.nativeElement.isRendered) {
            this.nativeElement.deleteRow(Rowindex);
        }
        else {
            this.nativeElement.whenRendered(() => {
                this.nativeElement.deleteRow(Rowindex);
            });
        }
    }
    /** @description Clears all elements from the value array, resulting in an empty array. This operation removes all existing items, leaving the array with a length of zero.
    */
    emptyArray() {
        if (this.nativeElement.isRendered) {
            this.nativeElement.emptyArray();
        }
        else {
            this.nativeElement.whenRendered(() => {
                this.nativeElement.emptyArray();
            });
        }
    }
    /** @description Marks the endpoint of a selection range that was initiated using the startSelection method. This designation indicates where the selected content ends, completing the area or text chosen by the user.
    * @param {number} Rowboundindex. The bound index of the row (y coordinate) to end the selection to.
    * @param {number} Columnboundindex. The bound index of the column (x coordinate) to end the selection to.
    */
    endSelection(Rowboundindex, Columnboundindex) {
        if (this.nativeElement.isRendered) {
            this.nativeElement.endSelection(Rowboundindex, Columnboundindex);
        }
        else {
            this.nativeElement.whenRendered(() => {
                this.nativeElement.endSelection(Rowboundindex, Columnboundindex);
            });
        }
    }
    /** @description Returns the HTML element located at the specified visible row and column coordinates within the Array's rendered grid. The coordinates refer to the zero-based indexes of the currently visible rows and columns, taking into account any scrolling or filtering applied to the Array's display.
    * @param {number} RowVisibleIndex. The visible index of the row (y coordinate) of the element.
    * @param {number} ColumnVisibleIndex. The visible index of the column (x coordinate) of the element.
    * @returns {HTMLElement}
  */
    getElement(RowVisibleIndex, ColumnVisibleIndex) {
        return __awaiter(this, void 0, void 0, function* () {
            const getResultOnRender = () => {
                return new Promise(resolve => {
                    this.nativeElement.whenRendered(() => {
                        const result = this.nativeElement.getElement(RowVisibleIndex, ColumnVisibleIndex);
                        resolve(result);
                    });
                });
            };
            const result = yield getResultOnRender();
            return result;
        });
    }
    getElementSync(RowVisibleIndex, ColumnVisibleIndex) {
        if (this.nativeElement.isRendered) {
            return this.nativeElement.getElement(RowVisibleIndex, ColumnVisibleIndex);
        }
        return null;
    }
    /** @description Returns an object containing the width and height properties extracted from each element of the array. Each property in the resulting object corresponds to the respective width and height values of the array elements.
    * @returns {any}
  */
    getElementSize() {
        return __awaiter(this, void 0, void 0, function* () {
            const getResultOnRender = () => {
                return new Promise(resolve => {
                    this.nativeElement.whenRendered(() => {
                        const result = this.nativeElement.getElementSize();
                        resolve(result);
                    });
                });
            };
            const result = yield getResultOnRender();
            return result;
        });
    }
    getElementSizeSync() {
        if (this.nativeElement.isRendered) {
            return this.nativeElement.getElementSize();
        }
        return null;
    }
    /** @description Retrieves an array containing the values associated with all defined indexers in the collection. Each element in the array corresponds to a value stored at a specific indexer, allowing you to access the complete set of indexed values managed by the collection.
    * @returns {any[]}
  */
    getIndexerValue() {
        return __awaiter(this, void 0, void 0, function* () {
            const getResultOnRender = () => {
                return new Promise(resolve => {
                    this.nativeElement.whenRendered(() => {
                        const result = this.nativeElement.getIndexerValue();
                        resolve(result);
                    });
                });
            };
            const result = yield getResultOnRender();
            return result;
        });
    }
    getIndexerValueSync() {
        if (this.nativeElement.isRendered) {
            return this.nativeElement.getIndexerValue();
        }
        return null;
    }
    /** @description Returns the HTML element from the array located at the specified page coordinates, along with additional details about the element, such as its index in the array, bounding rectangle, and any relevant data attributes. This allows for precise identification and interaction with elements based on their position on the page.
    * @param {number} Pagexcoordinate.
    * @param {number} Pageycoordinate.
    * @returns {any}
  */
    hitTest(Pagexcoordinate, Pageycoordinate) {
        return __awaiter(this, void 0, void 0, function* () {
            const getResultOnRender = () => {
                return new Promise(resolve => {
                    this.nativeElement.whenRendered(() => {
                        const result = this.nativeElement.hitTest(Pagexcoordinate, Pageycoordinate);
                        resolve(result);
                    });
                });
            };
            const result = yield getResultOnRender();
            return result;
        });
    }
    hitTestSync(Pagexcoordinate, Pageycoordinate) {
        if (this.nativeElement.isRendered) {
            return this.nativeElement.hitTest(Pagexcoordinate, Pageycoordinate);
        }
        return null;
    }
    /** @description Inserts a new column into the value array at the specified position, placing it immediately before the given column index. The inserted column will be automatically populated with default values for each corresponding row, ensuring array structure consistency.
    * @param {number} Columnindex. Index of the column to add a new column before.
    */
    insertColumnBefore(Columnindex) {
        if (this.nativeElement.isRendered) {
            this.nativeElement.insertColumnBefore(Columnindex);
        }
        else {
            this.nativeElement.whenRendered(() => {
                this.nativeElement.insertColumnBefore(Columnindex);
            });
        }
    }
    /** @description Inserts a new row with default values into the value array at the specified index, placing it immediately before the targeted row. All columns in the new row are initialized with their default values.
    * @param {number} Rowindex. Index of the row to add a new row before.
    */
    insertRowBefore(Rowindex) {
        if (this.nativeElement.isRendered) {
            this.nativeElement.insertRowBefore(Rowindex);
        }
        else {
            this.nativeElement.whenRendered(() => {
                this.nativeElement.insertRowBefore(Rowindex);
            });
        }
    }
    /** @description Sets every element in the value array to its specified default value. This operation replaces the current contents of the array with the default, ensuring consistency across all elements.
    */
    reinitializeArray() {
        if (this.nativeElement.isRendered) {
            this.nativeElement.reinitializeArray();
        }
        else {
            this.nativeElement.whenRendered(() => {
                this.nativeElement.reinitializeArray();
            });
        }
    }
    /** @description Removes a specified dimension from the array.Note: If you need to remove multiple dimensions at once, it is recommended to dynamically update the dimensions property with the desired set of dimensions to ensure proper handling and improved performance.
    */
    removeDimension() {
        if (this.nativeElement.isRendered) {
            this.nativeElement.removeDimension();
        }
        else {
            this.nativeElement.whenRendered(() => {
                this.nativeElement.removeDimension();
            });
        }
    }
    /** @description Sets the array's type property to 'none', indicating that the array does not enforce a specific data type for its elements. This allows elements of any type to be stored within the array.
    */
    reset() {
        if (this.nativeElement.isRendered) {
            this.nativeElement.reset();
        }
        else {
            this.nativeElement.whenRendered(() => {
                this.nativeElement.reset();
            });
        }
    }
    /** @description Adjusts the dimensions of array elements by modifying both the width of each column and the height of each row, allowing for dynamic resizing of the entire array layout.
    * @param {number} Elementwidth. The new element (column) width.
    * @param {number} Elementheight. The new element (row) height.
    */
    resizeElement(Elementwidth, Elementheight) {
        if (this.nativeElement.isRendered) {
            this.nativeElement.resizeElement(Elementwidth, Elementheight);
        }
        else {
            this.nativeElement.whenRendered(() => {
                this.nativeElement.resizeElement(Elementwidth, Elementheight);
            });
        }
    }
    /** @description Selects every element within the array, including all items from the first to the last, without omission.
    */
    selectAll() {
        if (this.nativeElement.isRendered) {
            this.nativeElement.selectAll();
        }
        else {
            this.nativeElement.whenRendered(() => {
                this.nativeElement.selectAll();
            });
        }
    }
    /** @description Selects an element located at the specified row and column indices within a grid or table structure. The indices provided are used as bounds to identify the exact element to retrieve or manipulate.
    * @param {number} Rowboundindex.
    * @param {number} Columnboundindex.
    */
    selectElement(Rowboundindex, Columnboundindex) {
        if (this.nativeElement.isRendered) {
            this.nativeElement.selectElement(Rowboundindex, Columnboundindex);
        }
        else {
            this.nativeElement.whenRendered(() => {
                this.nativeElement.selectElement(Rowboundindex, Columnboundindex);
            });
        }
    }
    /** @description Specifies the width of a column or element, determining how much horizontal space it occupies. Accepts values in units such as pixels (px), percentages (%), or other valid CSS measurements. Use this property to control the layout and appearance of table columns or block-level elements.
    * @param {number} Columnwidth. The new column width.
    */
    setColumnWidth(Columnwidth) {
        if (this.nativeElement.isRendered) {
            this.nativeElement.setColumnWidth(Columnwidth);
        }
        else {
            this.nativeElement.whenRendered(() => {
                this.nativeElement.setColumnWidth(Columnwidth);
            });
        }
    }
    /** @description Specifies the initial value assigned to each element in the array when it is first created. If no value is provided during array initialization, this default value will be used for all members.
    * @param {any} Defaultvalue. The new default value. Its data type should correspond to the <strong>type</strong> of the Array.
    */
    setDefaultValue(Defaultvalue) {
        if (this.nativeElement.isRendered) {
            this.nativeElement.setDefaultValue(Defaultvalue);
        }
        else {
            this.nativeElement.whenRendered(() => {
                this.nativeElement.setDefaultValue(Defaultvalue);
            });
        }
    }
    /** @description Sets the value(s) at one or more specified indices within an array. This operation assigns new data to the given positions, updating the contents of the array at the corresponding indexes. Use this method to modify existing elements or insert new values at particular locations in the array by specifying the target index or indices.
    * @param {any[]} Settings. An array of objects with the fields index and value.
    */
    setIndexerValue(Settings) {
        if (this.nativeElement.isRendered) {
            this.nativeElement.setIndexerValue(Settings);
        }
        else {
            this.nativeElement.whenRendered(() => {
                this.nativeElement.setIndexerValue(Settings);
            });
        }
    }
    /** @description Specifies the height of each row (element), determining the vertical space allocated to individual rows within the component or layout. This property controls how tall each row appears, impacting the overall layout and visibility of row content. Accepts values in pixels, percentages, or other valid CSS units.
    * @param {number} Rowheight. The new row height.
    */
    setRowHeight(Rowheight) {
        if (this.nativeElement.isRendered) {
            this.nativeElement.setRowHeight(Rowheight);
        }
        else {
            this.nativeElement.whenRendered(() => {
                this.nativeElement.setRowHeight(Rowheight);
            });
        }
    }
    /** @description Reveals the last element in the array by changing its visibility property, ensuring it is displayed to the user.
    */
    showLastElement() {
        if (this.nativeElement.isRendered) {
            this.nativeElement.showLastElement();
        }
        else {
            this.nativeElement.whenRendered(() => {
                this.nativeElement.showLastElement();
            });
        }
    }
    /** @description Indicates the starting point of a selection range. To complete the selection, invoke the endSelection method, which marks the end point of the selection. This process allows you to define a specific range within the content for further manipulation or processing.
    * @param {number} Rowboundindex. The bound index of the row (y coordinate) to start the selection from.
    * @param {number} Columnboundindex. The bound index of the column (x coordinate) to start the selection from.
    */
    startSelection(Rowboundindex, Columnboundindex) {
        if (this.nativeElement.isRendered) {
            this.nativeElement.startSelection(Rowboundindex, Columnboundindex);
        }
        else {
            this.nativeElement.whenRendered(() => {
                this.nativeElement.startSelection(Rowboundindex, Columnboundindex);
            });
        }
    }
    /** @description Adjusts the amount of visible spacing between each element in the array, either increasing or decreasing the gap to improve layout and readability on the user interface.
    */
    toggleElementGap() {
        if (this.nativeElement.isRendered) {
            this.nativeElement.toggleElementGap();
        }
        else {
            this.nativeElement.whenRendered(() => {
                this.nativeElement.toggleElementGap();
            });
        }
    }
    /** @description Transposes the given array by swapping its rows and columns. This operation is only applicable when the dimensions property is set to 2, indicating a two-dimensional (2D) array. For example, a 2D array of size m x n will become an n x m array after transposition.
    */
    transposeArray() {
        if (this.nativeElement.isRendered) {
            this.nativeElement.transposeArray();
        }
        else {
            this.nativeElement.whenRendered(() => {
                this.nativeElement.transposeArray();
            });
        }
    }
    /** @description Allows you to retrieve the entire array's contents, assign a new value to the whole array, or update the value of a specific array element (member) by its index.
    * @param {any} Newvalue?. If the method is used for setting the value of the whole array, the expected value is an array. If it is used for setting the value of an array member, the value can be of any applicable type.
    * @param {number | number[]} Elementindexes?. If this parameter is passed, only the value of the array member with the provided dimension indexes is set. Dimension indexes that are not passed are considered to be 0.
    * @returns {any[]}
  */
    val(Newvalue, Elementindexes) {
        return __awaiter(this, void 0, void 0, function* () {
            const getResultOnRender = () => {
                return new Promise(resolve => {
                    this.nativeElement.whenRendered(() => {
                        const result = this.nativeElement.val(Newvalue, Elementindexes);
                        resolve(result);
                    });
                });
            };
            const result = yield getResultOnRender();
            return result;
        });
    }
    valSync(Newvalue, Elementindexes) {
        if (this.nativeElement.isRendered) {
            return this.nativeElement.val(Newvalue, Elementindexes);
        }
        return null;
    }
    get isRendered() {
        return this.nativeElement ? this.nativeElement.isRendered : false;
    }
    ngOnInit() {
    }
    ngAfterViewInit() {
        const that = this;
        that.onCreate.emit(that.nativeElement);
        if (Smart)
            Smart.Render();
        this.nativeElement.classList.add('smart-angular');
        if (this.nativeElement.whenRendered)
            this.nativeElement.whenRendered(() => { that.onReady.emit(that.nativeElement); });
        this.listen();
    }
    ngOnDestroy() {
        this.unlisten();
    }
    ngOnChanges(changes) {
        if (this.nativeElement && this.nativeElement.isRendered) {
            for (const propName in changes) {
                if (changes.hasOwnProperty(propName)) {
                    this.nativeElement[propName] = changes[propName].currentValue;
                }
            }
        }
    }
    /** @description Add event listeners. */
    listen() {
        const that = this;
        that.eventHandlers['arraySizeChangeHandler'] = (event) => { that.onArraySizeChange.emit(event); };
        that.nativeElement.addEventListener('arraySizeChange', that.eventHandlers['arraySizeChangeHandler']);
        that.eventHandlers['changeHandler'] = (event) => { that.onChange.emit(event); };
        that.nativeElement.addEventListener('change', that.eventHandlers['changeHandler']);
        that.eventHandlers['dimensionChangeHandler'] = (event) => { that.onDimensionChange.emit(event); };
        that.nativeElement.addEventListener('dimensionChange', that.eventHandlers['dimensionChangeHandler']);
        that.eventHandlers['elementClickHandler'] = (event) => { that.onElementClick.emit(event); };
        that.nativeElement.addEventListener('elementClick', that.eventHandlers['elementClickHandler']);
        that.eventHandlers['scrollHandler'] = (event) => { that.onScroll.emit(event); };
        that.nativeElement.addEventListener('scroll', that.eventHandlers['scrollHandler']);
        that.eventHandlers['sizeChangeHandler'] = (event) => { that.onSizeChange.emit(event); };
        that.nativeElement.addEventListener('sizeChange', that.eventHandlers['sizeChangeHandler']);
    }
    /** @description Remove event listeners. */
    unlisten() {
        const that = this;
        if (that.eventHandlers['arraySizeChangeHandler']) {
            that.nativeElement.removeEventListener('arraySizeChange', that.eventHandlers['arraySizeChangeHandler']);
        }
        if (that.eventHandlers['changeHandler']) {
            that.nativeElement.removeEventListener('change', that.eventHandlers['changeHandler']);
        }
        if (that.eventHandlers['dimensionChangeHandler']) {
            that.nativeElement.removeEventListener('dimensionChange', that.eventHandlers['dimensionChangeHandler']);
        }
        if (that.eventHandlers['elementClickHandler']) {
            that.nativeElement.removeEventListener('elementClick', that.eventHandlers['elementClickHandler']);
        }
        if (that.eventHandlers['scrollHandler']) {
            that.nativeElement.removeEventListener('scroll', that.eventHandlers['scrollHandler']);
        }
        if (that.eventHandlers['sizeChangeHandler']) {
            that.nativeElement.removeEventListener('sizeChange', that.eventHandlers['sizeChangeHandler']);
        }
    }
}
ArrayComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: ArrayComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
ArrayComponent.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.6", type: ArrayComponent, selector: "smart-array, [smart-array]", inputs: { animation: "animation", arrayIndexingMode: "arrayIndexingMode", changeProperty: "changeProperty", columns: "columns", customWidgetDefaultValue: "customWidgetDefaultValue", dimensions: "dimensions", disabled: "disabled", elementHeight: "elementHeight", elementTemplate: "elementTemplate", elementWidth: "elementWidth", getElementValue: "getElementValue", indexerHeight: "indexerHeight", indexerWidth: "indexerWidth", unlockKey: "unlockKey", locale: "locale", localizeFormatFunction: "localizeFormatFunction", messages: "messages", readonly: "readonly", rows: "rows", setElementValue: "setElementValue", showHorizontalScrollbar: "showHorizontalScrollbar", showIndexDisplay: "showIndexDisplay", showSelection: "showSelection", showVerticalScrollbar: "showVerticalScrollbar", theme: "theme", type: "type", unfocusable: "unfocusable", value: "value" }, outputs: { onArraySizeChange: "onArraySizeChange", onChange: "onChange", onDimensionChange: "onDimensionChange", onElementClick: "onElementClick", onScroll: "onScroll", onSizeChange: "onSizeChange" }, exportAs: ["smart-array"], usesInheritance: true, usesOnChanges: true, ngImport: i0 });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: ArrayComponent, decorators: [{
            type: Directive,
            args: [{
                    exportAs: 'smart-array', selector: 'smart-array, [smart-array]'
                }]
        }], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { animation: [{
                type: Input
            }], arrayIndexingMode: [{
                type: Input
            }], changeProperty: [{
                type: Input
            }], columns: [{
                type: Input
            }], customWidgetDefaultValue: [{
                type: Input
            }], dimensions: [{
                type: Input
            }], disabled: [{
                type: Input
            }], elementHeight: [{
                type: Input
            }], elementTemplate: [{
                type: Input
            }], elementWidth: [{
                type: Input
            }], getElementValue: [{
                type: Input
            }], indexerHeight: [{
                type: Input
            }], indexerWidth: [{
                type: Input
            }], unlockKey: [{
                type: Input
            }], locale: [{
                type: Input
            }], localizeFormatFunction: [{
                type: Input
            }], messages: [{
                type: Input
            }], readonly: [{
                type: Input
            }], rows: [{
                type: Input
            }], setElementValue: [{
                type: Input
            }], showHorizontalScrollbar: [{
                type: Input
            }], showIndexDisplay: [{
                type: Input
            }], showSelection: [{
                type: Input
            }], showVerticalScrollbar: [{
                type: Input
            }], theme: [{
                type: Input
            }], type: [{
                type: Input
            }], unfocusable: [{
                type: Input
            }], value: [{
                type: Input
            }], onArraySizeChange: [{
                type: Output
            }], onChange: [{
                type: Output
            }], onDimensionChange: [{
                type: Output
            }], onElementClick: [{
                type: Output
            }], onScroll: [{
                type: Output
            }], onSizeChange: [{
                type: Output
            }] } });

class ArrayModule {
}
ArrayModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: ArrayModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
ArrayModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: ArrayModule, declarations: [ArrayComponent], exports: [ArrayComponent] });
ArrayModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: ArrayModule });
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.6", ngImport: i0, type: ArrayModule, decorators: [{
            type: NgModule,
            args: [{
                    declarations: [ArrayComponent],
                    schemas: [CUSTOM_ELEMENTS_SCHEMA],
                    exports: [ArrayComponent]
                }]
        }] });

/**
 * Generated bundle index. Do not edit.
 */

export { ArrayComponent, ArrayModule, Smart };
//# sourceMappingURL=smart-webcomponents-angular-array.mjs.map
