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

  attr :class, :string, default: nil

  def download_icon(assigns) do
    ~H"""
    <svg
      viewBox="0 0 20 20"
      fill="none"
      xmlns="http://www.w3.org/2000/svg"
      class={"fill-accent stroke-accent dark:fill-secondary-text dark:stroke-secondary-text #{@class}"}
    >
      <g class="download-icon">
        <path
          d="M10.0002 2.67676C10.0394 2.67681 10.0775 2.68861 10.1096 2.70996L10.1399 2.73535C10.1769 2.77246 10.1975 2.82257 10.1975 2.875V12.6572L10.886 11.9043L13.0198 9.56836L13.0208 9.56934C13.0473 9.54035 13.0818 9.52007 13.1194 9.51074L13.1584 9.50488C13.1978 9.50317 13.2365 9.51307 13.2698 9.5332L13.301 9.55664C13.33 9.58322 13.3503 9.61763 13.3596 9.65527L13.3655 9.69434C13.3671 9.73377 13.3564 9.77243 13.3362 9.80566L13.3127 9.83691L10.1467 13.2998C10.1374 13.31 10.1266 13.3192 10.1155 13.3271L10.0803 13.3477C10.0552 13.3587 10.0277 13.3643 10.0002 13.3643C9.98643 13.3642 9.97266 13.3632 9.95923 13.3604L9.92017 13.3477C9.90769 13.3421 9.89603 13.3351 9.88501 13.3271L9.85474 13.2998L6.69165 9.84082C6.67433 9.82135 6.66105 9.79854 6.65259 9.77441L6.64185 9.69922C6.64318 9.67333 6.64958 9.64802 6.6604 9.625L6.70532 9.5625C6.72442 9.54506 6.74694 9.53221 6.77075 9.52344L6.84692 9.51172C6.87287 9.51275 6.89796 9.51872 6.92114 9.5293L6.98364 9.57324L9.1145 11.9053L9.802 12.6582V2.875C9.802 2.82268 9.82273 2.77243 9.85962 2.73535C9.88746 2.70751 9.92313 2.68826 9.96118 2.68066L10.0002 2.67676Z"
          stroke-width="0.791667"
        />
        <path
          d="M17.125 12.1768C17.1642 12.1768 17.2022 12.1886 17.2344 12.21L17.2646 12.2354C17.3018 12.2725 17.3232 12.3225 17.3232 12.375V12.4189C17.3232 13.5107 17.3218 14.3528 17.2344 15.0068C17.155 15.5925 17.005 16.051 16.707 16.418L16.5693 16.5693C16.2275 16.9112 15.8002 17.095 15.25 17.1963L15.0068 17.2344C14.3528 17.3218 13.5107 17.3232 12.4189 17.3232H7.58105C6.48877 17.3232 5.64633 17.3219 4.99219 17.2344H4.99316C4.32373 17.1436 3.82124 16.9599 3.43066 16.5693H3.42969C3.08869 16.2274 2.90505 15.7997 2.80469 15.251L2.7666 15.0078L2.7373 14.7529C2.67806 14.1388 2.67676 13.3746 2.67676 12.4189V12.375C2.67676 12.3358 2.68864 12.2978 2.70996 12.2656L2.73535 12.2354C2.77247 12.1982 2.82251 12.1768 2.875 12.1768C2.91418 12.1768 2.9522 12.1886 2.98438 12.21L3.01465 12.2354C3.05177 12.2725 3.07324 12.3225 3.07324 12.375C3.07324 13.3592 3.07329 14.1129 3.12988 14.708L3.1582 14.9541C3.23194 15.5015 3.3659 15.8796 3.60254 16.1699L3.71094 16.2891V16.29C3.97735 16.5555 4.31983 16.7145 4.82031 16.8066L5.04492 16.8418H5.0459C5.67593 16.926 6.50036 16.9268 7.625 16.9268H12.375C13.3592 16.9268 14.1129 16.9267 14.708 16.8701L14.9541 16.8418C15.5015 16.7681 15.8796 16.6341 16.1699 16.3975L16.2891 16.2891H16.29C16.5555 16.0226 16.7145 15.6802 16.8066 15.1797L16.8418 14.9551V14.9541C16.926 14.3233 16.9268 13.4997 16.9268 12.375C16.9268 12.3358 16.9386 12.2978 16.96 12.2656L16.9854 12.2354C17.0225 12.1982 17.0725 12.1768 17.125 12.1768Z"
          stroke-width="0.791667"
        />
      </g>
    </svg>
    """
  end
end
