/*!
 * Copyright (c) 2026 Vertex Software LLC. All rights reserved.
 */
import { h } from "@stencil/core";
export class ViewerDefaultToolbar {
    constructor() {
        /**
         * Specifies where the toolbar is positioned.
         */
        this.placement = 'bottom-center';
        /**
         * Specifies the direction that UI elements are placed.
         */
        this.direction = 'horizontal';
        /**
         * Indicates whether animations will be used when performing camera
         * operations. Defaults to `true`.
         */
        this.animationsDisabled = false;
        /**
         * The duration of animations, in milliseconds. Defaults to `1000`.
         */
        this.animationMs = 1000;
    }
    render() {
        return (h("vertex-viewer-toolbar", { key: '58781d25dbddb4e75f5be56d5ab0d9c2c232aee1', placement: this.placement, direction: this.direction }, h("vertex-viewer-toolbar-group", { key: '3c6f854f20b29bac33318c5aca11647f6f0c7396', class: "group", direction: this.direction, "data-direction": this.direction }, h("vertex-viewer-button", { key: '1cf18704559b00b0ceb10cea67125147a2431e8a', class: "group-item btn", "data-test-id": "fit-all-btn", onClick: () => this.viewAll() }, h("vertex-viewer-icon", { key: 'b24ac73216986e134fe4b27b5f254d43ffe755be', class: "icon", name: "fit-all", size: "md" })))));
    }
    async viewAll() {
        var _a;
        const scene = await ((_a = this.viewer) === null || _a === void 0 ? void 0 : _a.scene());
        const animation = this.animationsDisabled
            ? undefined
            : { milliseconds: this.animationMs };
        scene === null || scene === void 0 ? void 0 : scene.camera().viewAll().render({ animation });
    }
    static get is() { return "vertex-viewer-default-toolbar"; }
    static get encapsulation() { return "shadow"; }
    static get originalStyleUrls() {
        return {
            "$": ["viewer-default-toolbar.css"]
        };
    }
    static get styleUrls() {
        return {
            "$": ["viewer-default-toolbar.css"]
        };
    }
    static get properties() {
        return {
            "viewer": {
                "type": "unknown",
                "mutable": false,
                "complexType": {
                    "original": "HTMLVertexViewerElement",
                    "resolved": "HTMLVertexViewerElement | undefined",
                    "references": {
                        "HTMLVertexViewerElement": {
                            "location": "global",
                            "id": "global::HTMLVertexViewerElement"
                        }
                    }
                },
                "required": false,
                "optional": true,
                "docs": {
                    "tags": [],
                    "text": "An instance of the viewer that operations will be performed on. If\ncontained within a `<vertex-viewer>` element, this property will\nautomatically be wired."
                },
                "getter": false,
                "setter": false
            },
            "placement": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "ViewerToolbarPlacement",
                    "resolved": "\"bottom-center\" | \"bottom-left\" | \"bottom-right\" | \"middle-left\" | \"middle-right\" | \"top-center\" | \"top-left\" | \"top-right\"",
                    "references": {
                        "ViewerToolbarPlacement": {
                            "location": "import",
                            "path": "../viewer-toolbar/types",
                            "id": "src/components/viewer-toolbar/types.ts::ViewerToolbarPlacement",
                            "referenceLocation": "ViewerToolbarPlacement"
                        }
                    }
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Specifies where the toolbar is positioned."
                },
                "getter": false,
                "setter": false,
                "reflect": false,
                "attribute": "placement",
                "defaultValue": "'bottom-center'"
            },
            "direction": {
                "type": "string",
                "mutable": false,
                "complexType": {
                    "original": "ViewerToolbarGroupDirection",
                    "resolved": "\"horizontal\" | \"vertical\"",
                    "references": {
                        "ViewerToolbarGroupDirection": {
                            "location": "import",
                            "path": "../viewer-toolbar-group/types",
                            "id": "src/components/viewer-toolbar-group/types.ts::ViewerToolbarGroupDirection",
                            "referenceLocation": "ViewerToolbarGroupDirection"
                        }
                    }
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Specifies the direction that UI elements are placed."
                },
                "getter": false,
                "setter": false,
                "reflect": false,
                "attribute": "direction",
                "defaultValue": "'horizontal'"
            },
            "animationsDisabled": {
                "type": "boolean",
                "mutable": false,
                "complexType": {
                    "original": "boolean",
                    "resolved": "boolean",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "Indicates whether animations will be used when performing camera\noperations. Defaults to `true`."
                },
                "getter": false,
                "setter": false,
                "reflect": false,
                "attribute": "animations-disabled",
                "defaultValue": "false"
            },
            "animationMs": {
                "type": "number",
                "mutable": false,
                "complexType": {
                    "original": "number",
                    "resolved": "number",
                    "references": {}
                },
                "required": false,
                "optional": false,
                "docs": {
                    "tags": [],
                    "text": "The duration of animations, in milliseconds. Defaults to `1000`."
                },
                "getter": false,
                "setter": false,
                "reflect": false,
                "attribute": "animation-ms",
                "defaultValue": "1000"
            }
        };
    }
}
//# sourceMappingURL=viewer-default-toolbar.js.map
