// The MIT License (MIT)
//
// Copyright (c) 2021-2024 Camptocamp SA
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of
// this software and associated documentation files (the "Software"), to deal in
// the Software without restriction, including without limitation the rights to
// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
// the Software, and to permit persons to whom the Software is furnished to do so,
// subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
import { html } from 'lit';
import { customElement } from 'lit/decorators.js';
import ToolButtonElement from 'gmfapi/elements/ToolButtonElement';
import i18next from 'i18next';
import 'bootstrap/js/src/tooltip';
import { state } from 'lit/decorators.js';
import panels from 'gmfapi/store/panels';
let ToolButtonPrint = class ToolButtonPrint extends ToolButtonElement {
    constructor() {
        super('print');
    }
    render() {
        return html `
      <button
        @click=${() => this.click_()}
        class="btn btn-default ${this.active_ ? 'active' : ''}"
        data-toggle="tooltip"
        data-placement="left"
        data-original-title="${i18next.t('Print')}"
      >
        <span class="fa-solid fa-print"></span>
      </button>
    `;
    }
};
ToolButtonPrint = __decorate([
    customElement('gmf-print-button')
], ToolButtonPrint);
export { ToolButtonPrint };
let ToolButtonDraw = class ToolButtonDraw extends ToolButtonElement {
    constructor() {
        super('draw');
    }
    render() {
        return html `
      <button
        @click=${() => this.click_()}
        class="btn btn-default ${this.active_ ? 'active' : ''}"
        data-toggle="tooltip"
        data-placement="left"
        data-original-title="${i18next.t('Draw and Measure')}"
      >
        <span class="fa-solid fa-paintbrush"></span>
      </button>
    `;
    }
};
ToolButtonDraw = __decorate([
    customElement('gmf-draw-button')
], ToolButtonDraw);
export { ToolButtonDraw };
let ToolButtonFilter = class ToolButtonFilter extends ToolButtonElement {
    constructor() {
        super('filter');
        this.filter_ = false;
    }
    connectedCallback() {
        super.connectedCallback();
        this.subscriptions.push(panels.getFilterActive().subscribe({
            next: (active) => {
                this.filter_ = active;
            },
        }));
    }
    render() {
        return html `
      <button
        @click=${() => this.click_()}
        class="btn btn-default ${this.active_ ? 'active' : ''}"
        data-toggle="tooltip"
        data-placement="left"
        data-original-title="${i18next.t('Filter')}"
      >
        <span class="fa-solid ${this.filter_ ? 'fa-filter-circle-dollar' : 'fa-filter'}"></span>
      </button>
    `;
    }
};
__decorate([
    state()
], ToolButtonFilter.prototype, "filter_", void 0);
ToolButtonFilter = __decorate([
    customElement('gmf-filter-button')
], ToolButtonFilter);
export { ToolButtonFilter };
let ToolButtonEditing = class ToolButtonEditing extends ToolButtonElement {
    constructor() {
        super('editing');
    }
    render() {
        return html `
      <button
        @click=${() => this.click_()}
        class="btn btn-default ${this.active_ ? 'active' : ''}"
        data-toggle="tooltip"
        data-placement="left"
        data-original-title="${i18next.t('Editing')}"
      >
        <span class="fa-solid fa-pen-to-square"></span>
      </button>
    `;
    }
};
ToolButtonEditing = __decorate([
    customElement('gmf-editing-button')
], ToolButtonEditing);
export { ToolButtonEditing };
let ToolButtonProfile = class ToolButtonProfile extends ToolButtonElement {
    constructor() {
        super('profile');
    }
    render() {
        return html `
      <button
        @click=${() => this.click_()}
        class="btn btn-default ${this.active_ ? 'active' : ''}"
        data-toggle="tooltip"
        data-placement="left"
        data-original-title="${i18next.t('Elevation profile')}"
      >
        <span class="fa-solid fa-chart-area"></span>
      </button>
    `;
    }
};
ToolButtonProfile = __decorate([
    customElement('gmf-profile-button')
], ToolButtonProfile);
export { ToolButtonProfile };
let ToolButtonGooglestreetview = class ToolButtonGooglestreetview extends ToolButtonElement {
    constructor() {
        super('googlestreetview');
    }
    render() {
        return html `
      <button
        @click=${() => this.click_()}
        class="btn btn-default ${this.active_ ? 'active' : ''}"
        data-toggle="tooltip"
        data-placement="left"
        data-original-title="${i18next.t('Google Street View')}"
      >
        <span class="fa-solid fa-street-view"></span>
      </button>
    `;
    }
};
ToolButtonGooglestreetview = __decorate([
    customElement('gmf-googlestreetview-button')
], ToolButtonGooglestreetview);
export { ToolButtonGooglestreetview };
let ToolButtonMapillary = class ToolButtonMapillary extends ToolButtonElement {
    constructor() {
        super('mapillary');
    }
    render() {
        return html `
      <button
        @click=${() => this.click_()}
        class="btn btn-default ${this.active_ ? 'active' : ''}"
        data-toggle="tooltip"
        data-placement="left"
        data-original-title="${i18next.t('Mapillary')}"
      >
        <span class="fa-solid fa-street-view"></span>
      </button>
    `;
    }
};
ToolButtonMapillary = __decorate([
    customElement('gmf-mapillary-button')
], ToolButtonMapillary);
export { ToolButtonMapillary };
let ToolButtonSelect = class ToolButtonSelect extends ToolButtonElement {
    constructor() {
        super('selection');
    }
    render() {
        return html `
      <button
        @click=${() => this.click_()}
        class="btn btn-default ${this.active_ ? 'active' : ''}"
        data-toggle="tooltip"
        data-placement="left"
        data-original-title="${i18next.t('Selection')}"
      >
        <span>
          <i class="fa-solid fa-arrow-pointer"></i>
          <i class="fa-solid fa-info fa-sm offset-info-icon"></i>
        </span>
      </button>
    `;
    }
};
ToolButtonSelect = __decorate([
    customElement('gmf-select-button')
], ToolButtonSelect);
export { ToolButtonSelect };
let ToolButtonImport = class ToolButtonImport extends ToolButtonElement {
    constructor() {
        super('import');
    }
    render() {
        return html `
      <button
        @click=${() => this.click_()}
        class="btn btn-default ${this.active_ ? 'active' : ''}"
        data-toggle="tooltip"
        data-placement="left"
        data-original-title="${i18next.t('Import Layer')}"
      >
        <span class="fa-solid fa-upload"></span>
      </button>
    `;
    }
};
ToolButtonImport = __decorate([
    customElement('gmf-import-button')
], ToolButtonImport);
export { ToolButtonImport };
let ToolButtonRouting = class ToolButtonRouting extends ToolButtonElement {
    constructor() {
        super('routing');
    }
    render() {
        return html `
      <button
        @click=${() => this.click_()}
        class="btn btn-default ${this.active_ ? 'active' : ''}"
        data-toggle="tooltip"
        data-placement="left"
        data-original-title="${i18next.t('Routing')}"
      >
        <span class="fa-solid fa-signs-post"></span>
      </button>
    `;
    }
};
ToolButtonRouting = __decorate([
    customElement('gmf-routing-button')
], ToolButtonRouting);
export { ToolButtonRouting };
//# sourceMappingURL=ToolButtonsImplElements.js.map