import { unsafeCSS, LitElement, html } from "lit";
import { property } from "lit/decorators.js";
import compentStyle from "./wind-indicator.css.js";
import { customElement } from "../../decorator.js";
import { environmentSvgs } from "../watch/environment.js";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __decorateClass = (decorators, target, key, kind) => {
  var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
  for (var i = decorators.length - 1, decorator; i >= 0; i--)
    if (decorator = decorators[i])
      result = (kind ? decorator(target, key, result) : decorator(result)) || result;
  if (kind && result) __defProp(target, key, result);
  return result;
};
let ObcWindIndicator = class extends LitElement {
  constructor() {
    super(...arguments);
    this.speed = 0;
    this.angle = 0;
    this.northUp = false;
  }
  render() {
    const windSymbolName = `wind-${this.speed + 1}.svg`;
    const windSymbol = environmentSvgs[windSymbolName];
    return html`
      <svg
        width="48"
        height="48"
        viewBox="0 0 48 48"
        fill="none"
        xmlns="http://www.w3.org/2000/svg"
      >
        <path
          transform="rotate(${this.northUp ? 0 : this.angle}, 24, 24)"
          d="M23.5929 1.56961L19.5645 7.20938C19.3281 7.54031 19.5646 8 19.9713 8L28.0281 8C28.4348 8 28.6714 7.54031 28.435 7.20938L24.4066 1.56961C24.2072 1.29044 23.7923 1.29044 23.5929 1.56961Z"
          fill="var(--instrument-tick-mark-tertiary-color)"
        />
        <circle
          cx="24"
          cy="24"
          r="18"
          fill="var(--instrument-frame-primary-color)"
          stroke="var(--instrument-frame-tertiary-color)"
        />
        <g
          transform="translate(24 24) rotate(${this.northUp ? this.angle : 0}) translate(-12 -12)"
        >
          ${windSymbol}
        </g>
      </svg>
    `;
  }
};
ObcWindIndicator.styles = unsafeCSS(compentStyle);
__decorateClass([
  property({ type: Number })
], ObcWindIndicator.prototype, "speed", 2);
__decorateClass([
  property({ type: Number })
], ObcWindIndicator.prototype, "angle", 2);
__decorateClass([
  property({ type: Boolean })
], ObcWindIndicator.prototype, "northUp", 2);
ObcWindIndicator = __decorateClass([
  customElement("obc-wind-indicator")
], ObcWindIndicator);
export {
  ObcWindIndicator
};
//# sourceMappingURL=wind-indicator.js.map
