defmodule ToolboxWeb.Components.Icons.StarIcon do
  use Phoenix.Component

  attr :class, :string, default: nil

  def star_icon(assigns) do
    ~H"""
    <svg
      viewBox="0 0 20 20"
      fill="none"
      xmlns="http://www.w3.org/2000/svg"
      class={"stroke-accent dark:stroke-secondary-text #{@class}"}
    >
      <g class="star-icon" clip-path="url(#clip0_1153_244)">
        <path
          d="M8.16298 5.198C9.16602 3.39933 9.66714 2.5 10.4169 2.5C11.1666 2.5 11.6677 3.39933 12.6707 5.198L12.9304 5.6635C13.2154 6.17492 13.3579 6.43062 13.5796 6.59925C13.8012 6.76787 14.0783 6.83042 14.6325 6.9555L15.136 7.0695C17.0835 7.51046 18.0564 7.73054 18.2884 8.4755C18.5196 9.21967 17.8561 9.99629 16.5285 11.5487L16.1849 11.9501C15.8081 12.3911 15.6189 12.612 15.5342 12.8843C15.4495 13.1574 15.478 13.4519 15.535 14.0401L15.5872 14.5761C15.7875 16.6479 15.8881 17.6834 15.2816 18.1433C14.6752 18.6033 13.7632 18.1837 11.9408 17.3445L11.4682 17.1276C10.9504 16.8885 10.6916 16.7698 10.4169 16.7698C10.1421 16.7698 9.88327 16.8885 9.36552 17.1276L8.89369 17.3445C7.07048 18.1837 6.15848 18.6033 5.55285 18.1441C4.94564 17.6834 5.04619 16.6479 5.24648 14.5761L5.29873 14.0409C5.35573 13.4519 5.38423 13.1574 5.29873 12.8851C5.21481 12.612 5.0256 12.3911 4.64877 11.9509L4.30519 11.5487C2.97756 9.99708 2.31414 9.22046 2.54531 8.4755C2.77648 7.73054 3.75102 7.50967 5.69852 7.0695L6.20202 6.9555C6.75539 6.83042 7.03169 6.76787 7.25414 6.59925C7.4766 6.43062 7.61831 6.17492 7.90331 5.6635L8.16298 5.198Z"
          stroke-width="1.5"
        />
      </g>
      <defs>
        <clipPath>
          <rect width="19" height="19" fill="white" transform="translate(0.5 0.5)" />
        </clipPath>
      </defs>
    </svg>
    """
  end
end
