<script setup lang="ts">
import { withDefaults } from "vue";

interface IProps {
  active: boolean;
}

const props = withDefaults(defineProps<IProps>(), {
  active: false,
});
</script>
<template>
  <svg
    :class="{ active: props.active }"
    xmlns="http://www.w3.org/2000/svg"
    width="14"
    height="8"
    viewBox="0 0 14 8"
    fill="none"
  >
    <path
      d="M1 1L7 7L13 1"
      stroke="var(--gray-200)"
      stroke-width="1.5"
      stroke-linecap="round"
      stroke-linejoin="round"
    />
  </svg>
</template>

<style scoped lang="scss">
svg {
  width: var(--w-3);
  height: var(--h-1-5);
  transition: var(--transition);

  path {
    transition: var(--transition);
    stroke: var(--gray-200);
  }

  &.active {
    transform: rotate(-180deg);
  }

  &.active path {
    stroke: var(--primary-500);
  }
}
</style>
