import { debounceEvent } from '../../../../utils/utils';
export class Action {
    onChange() {
        this.anjActionChange.emit();
    }
    componentDidLoad() {
        this.anjActionChange = debounceEvent(this.anjActionChange, 0);
    }
    static get is() { return "anj-action"; }
    static get properties() { return {
        "caption": {
            "type": "string",
            "mutable": false,
            "complexType": {
                "original": "string",
                "resolved": "string",
                "references": {}
            },
            "required": false,
            "optional": false,
            "docs": {
                "tags": [],
                "text": "Label to display when in a dropdown."
            },
            "attribute": "caption",
            "reflect": false
        },
        "disabled": {
            "type": "boolean",
            "mutable": false,
            "complexType": {
                "original": "boolean",
                "resolved": "boolean",
                "references": {}
            },
            "required": false,
            "optional": false,
            "docs": {
                "tags": [],
                "text": "If true, the action will render but cannot be interacted with."
            },
            "attribute": "disabled",
            "reflect": false
        },
        "disabledFn": {
            "type": "unknown",
            "mutable": false,
            "complexType": {
                "original": "ActionCallback",
                "resolved": "(action: ActionDefinition, data?: RowData) => string | boolean | void",
                "references": {
                    "ActionCallback": {
                        "location": "import",
                        "path": "../../table.types"
                    }
                }
            },
            "required": false,
            "optional": false,
            "docs": {
                "tags": [],
                "text": "Function to decide which icon to use.\n(action: RowActionDefinition, row: RowData) => boolean;"
            }
        },
        "hidden": {
            "type": "boolean",
            "mutable": false,
            "complexType": {
                "original": "boolean",
                "resolved": "boolean",
                "references": {}
            },
            "required": false,
            "optional": false,
            "docs": {
                "tags": [],
                "text": "If true, the action will not be rendered. This is different than the opacity games we play with row actions."
            },
            "attribute": "hidden",
            "reflect": false
        },
        "hiddenFn": {
            "type": "unknown",
            "mutable": false,
            "complexType": {
                "original": "ActionCallback",
                "resolved": "(action: ActionDefinition, data?: RowData) => string | boolean | void",
                "references": {
                    "ActionCallback": {
                        "location": "import",
                        "path": "../../table.types"
                    }
                }
            },
            "required": false,
            "optional": false,
            "docs": {
                "tags": [],
                "text": "Function to decide if the action is hidden\n(action: RowActionDefinition, row: RowData) => boolean;"
            }
        },
        "icon": {
            "type": "string",
            "mutable": false,
            "complexType": {
                "original": "string",
                "resolved": "string",
                "references": {}
            },
            "required": false,
            "optional": false,
            "docs": {
                "tags": [],
                "text": "Icon ligature to be used when a \"primary\" action."
            },
            "attribute": "icon",
            "reflect": false
        },
        "iconFn": {
            "type": "unknown",
            "mutable": false,
            "complexType": {
                "original": "ActionCallback",
                "resolved": "(action: ActionDefinition, data?: RowData) => string | boolean | void",
                "references": {
                    "ActionCallback": {
                        "location": "import",
                        "path": "../../table.types"
                    }
                }
            },
            "required": false,
            "optional": false,
            "docs": {
                "tags": [],
                "text": "Function to decide which icon to use.\n(action: RowActionDefinition, row: RowData) => string;"
            }
        },
        "name": {
            "type": "string",
            "mutable": false,
            "complexType": {
                "original": "string",
                "resolved": "string",
                "references": {}
            },
            "required": false,
            "optional": false,
            "docs": {
                "tags": [],
                "text": "Name of the action to take. Useful for decision making in the callback"
            },
            "attribute": "name",
            "reflect": false
        },
        "payload": {
            "type": "any",
            "mutable": false,
            "complexType": {
                "original": "any",
                "resolved": "any",
                "references": {}
            },
            "required": false,
            "optional": false,
            "docs": {
                "tags": [],
                "text": "Optional payload to be passed along when selected"
            },
            "attribute": "payload",
            "reflect": false
        },
        "scope": {
            "type": "string",
            "mutable": false,
            "complexType": {
                "original": "'table' | undefined",
                "resolved": "\"table\"",
                "references": {}
            },
            "required": false,
            "optional": false,
            "docs": {
                "tags": [],
                "text": "The scope of the action. The default of undefined scopes the action to the row level. A scope of \"table\" places it in the table header."
            },
            "attribute": "scope",
            "reflect": false
        }
    }; }
    static get events() { return [{
            "method": "anjActionChange",
            "name": "anjActionChange",
            "bubbles": true,
            "cancelable": true,
            "composed": true,
            "docs": {
                "tags": [],
                "text": ""
            },
            "complexType": {
                "original": "void",
                "resolved": "void",
                "references": {}
            }
        }]; }
    static get watchers() { return [{
            "propName": "disabled",
            "methodName": "onChange"
        }, {
            "propName": "hidden",
            "methodName": "onChange"
        }, {
            "propName": "icon",
            "methodName": "onChange"
        }, {
            "propName": "payload",
            "methodName": "onChange"
        }]; }
}
