@use "sass:math";
@use "sass:map";
@use "../util/scss/besm.scss" as *;
@use "../util/scss/include.scss" as *;
@use "../util/scss/add-rules.scss" as *;
@use "../util/scss/clockwise.scss" as *;
@use "./variables" as *;

@mixin cx-marker($name: "marker", $besm: $cx-besm) {
   $block: map.get($besm, block);
   $element: map.get($besm, element);
   $state: map.get($besm, state);

   .#{$element}#{$name}-shape {
      fill: $cx-default-chart-marker-color;
      stroke: $cx-default-chart-marker-color;
      stroke-width: $cx-default-chart-marker-stroke-width;

      .#{$state}draggable-x > & {
         cursor: ew-resize;
         touch-action: none;
      }

      .#{$state}draggable-y > & {
         cursor: ns-resize;
         touch-action: none;
      }

      .#{$state}draggable-xy > & {
         cursor: move;
         touch-action: none;
      }

      .#{$state}selectable > & {
         cursor: pointer;
      }

      &.#{$state}hidden {
         visibility: hidden;
      }
   }
}

@if (cx-should-include("cx/charts/Marker")) {
   @include cx-marker();
}
