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 { MapToComponentField, VegaSlimmer } from 'vega-slimmer/core';
import { VegaInternalIconManager } from '../../../../../helpers/icon/internal-icon-manager';
import { h } from '@stencil/core';
export class SortIconRenderer extends VegaSlimmer {
  render() {
    if (!this.sorter)
      return;
    const { icon, color } = SortIconRenderer.SORT_ICON_MAP[this.sortOrder || 'default'];
    return (h("span", { class: "vega-table-column-sorter" },
      h("vega-icon", { color: color, icon: VegaInternalIconManager.getIconKey(icon), size: "size-12" })));
  }
}
SortIconRenderer.SORT_ICON_MAP = {
  asc: {
    icon: 'circle-arrow-up',
    color: 'text-link',
  },
  desc: {
    icon: 'circle-arrow-down',
    color: 'text-link',
  },
  default: {
    icon: 'arrow-up-arrow-down',
    color: 'text-secondary',
  },
};
__decorate([
  MapToComponentField()
], SortIconRenderer.prototype, "sorter", void 0);
__decorate([
  MapToComponentField()
], SortIconRenderer.prototype, "sortOrder", void 0);
