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

  attr :class, :string, default: nil

  def hex_icon(assigns) do
    ~H"""
    <svg
      viewBox="0 0 24 24"
      fill="none"
      xmlns="http://www.w3.org/2000/svg"
      class={"fill-accent #{@class}"}
    >
      <g>
        <path
          fill-rule="evenodd"
          clip-rule="evenodd"
          d="M20.811 12.3746L16.731 19.4426C16.6651 19.5569 16.5701 19.6517 16.4559 19.7175C16.3416 19.7834 16.2119 19.8179 16.08 19.8176H7.92001C7.78836 19.8176 7.65903 19.783 7.54502 19.7172C7.43101 19.6513 7.33634 19.5567 7.27051 19.4426L3.19051 12.3746C3.12469 12.2606 3.09003 12.1313 3.09003 11.9996C3.09003 11.868 3.12469 11.7387 3.19051 11.6246L7.27051 4.55664C7.33634 4.44263 7.43101 4.34795 7.54502 4.28213C7.65903 4.2163 7.78836 4.18164 7.92001 4.18164H16.08C16.2117 4.18164 16.341 4.2163 16.455 4.28213C16.569 4.34795 16.6637 4.44263 16.7295 4.55664L20.8095 11.6246C20.8753 11.7387 20.91 11.868 20.91 11.9996C20.91 12.1313 20.8768 12.2606 20.811 12.3746ZM22.7595 10.4996C23.0228 10.9557 23.1614 11.473 23.1614 11.9996C23.1614 12.5263 23.0228 13.0436 22.7595 13.4996L18.6795 20.5676C18.4161 21.0239 18.0371 21.4028 17.5808 21.6661C17.1245 21.9294 16.6069 22.0679 16.08 22.0676H7.92001C7.39341 22.0676 6.8761 21.929 6.42005 21.6657C5.96401 21.4024 5.58531 21.0237 5.32201 20.5676L1.24201 13.4996C0.978707 13.0436 0.840088 12.5263 0.840088 11.9996C0.840088 11.473 0.978707 10.9557 1.24201 10.4996L5.32201 3.43164C5.58531 2.97559 5.96401 2.59689 6.42005 2.33358C6.8761 2.07028 7.39341 1.93165 7.92001 1.93164H16.08C16.6066 1.93165 17.1239 2.07028 17.58 2.33358C18.036 2.59689 18.4147 2.97559 18.678 3.43164L22.7595 10.4996ZM14.25 11.9996C14.25 12.5964 14.013 13.1687 13.591 13.5906C13.169 14.0126 12.5967 14.2496 12 14.2496C11.4033 14.2496 10.831 14.0126 10.409 13.5906C9.98706 13.1687 9.75001 12.5964 9.75001 11.9996C9.75001 11.4029 9.98706 10.8306 10.409 10.4086C10.831 9.98669 11.4033 9.74964 12 9.74964C12.5967 9.74964 13.169 9.98669 13.591 10.4086C14.013 10.8306 14.25 11.4029 14.25 11.9996ZM16.5 11.9996C16.5 13.1931 16.0259 14.3377 15.182 15.1816C14.3381 16.0255 13.1935 16.4996 12 16.4996C10.8065 16.4996 9.66194 16.0255 8.81803 15.1816C7.97412 14.3377 7.50001 13.1931 7.50001 11.9996C7.50001 10.8062 7.97412 9.66157 8.81803 8.81766C9.66194 7.97375 10.8065 7.49964 12 7.49964C13.1935 7.49964 14.3381 7.97375 15.182 8.81766C16.0259 9.66157 16.5 10.8062 16.5 11.9996Z"
        />
      </g>
    </svg>
    """
  end
end
