/**
 * Inline SVGs for the v3 flight search form, lifted from the design markup so
 * the shapes and the `fs-*` class hooks the stylesheet targets stay identical.
 */

export function ChevronIcon() {
  return (
    <svg className="fs-chevron" viewBox="0 0 24 24" fill="none" aria-hidden>
      <path d="M6 9l6 6 6-6" stroke="currentColor" strokeWidth="1.8" strokeLinecap="round" strokeLinejoin="round" />
    </svg>
  );
}

export function DepartIcon() {
  return (
    <svg className="fs-ic" viewBox="0 0 24 24" fill="none" aria-hidden>
      <path
        d="M21 16v-1.8l-8-4.7V4.2a1.3 1.3 0 0 0-2.6 0v5.3l-8 4.7V16l8-2.4v4.9l-2.1 1.4V21l3.4-.9 3.4.9v-1.1L13 18.5v-4.9L21 16Z"
        fill="currentColor"
      />
    </svg>
  );
}

/** Same glyph, flipped, so arriving reads as the mirror of departing. */
export function ArriveIcon() {
  return (
    <svg className="fs-ic" viewBox="0 0 24 24" fill="none" aria-hidden style={{ transform: 'scaleX(-1)' }}>
      <path
        d="M21 16v-1.8l-8-4.7V4.2a1.3 1.3 0 0 0-2.6 0v5.3l-8 4.7V16l8-2.4v4.9l-2.1 1.4V21l3.4-.9 3.4.9v-1.1L13 18.5v-4.9L21 16Z"
        fill="currentColor"
      />
    </svg>
  );
}

/** The ↳ elbow marking an airport listed under the city it is near. */
export function CornerIcon() {
  return (
    <svg className="fs-corner" viewBox="0 0 24 24" fill="none" aria-hidden>
      <path
        d="M7 5v7a3 3 0 0 0 3 3h7m0 0-3-3m3 3-3 3"
        stroke="currentColor"
        strokeWidth="1.6"
        strokeLinecap="round"
        strokeLinejoin="round"
      />
    </svg>
  );
}

export function SwapIcon() {
  return (
    <svg viewBox="0 0 24 24" fill="none" aria-hidden>
      <path d="M7 7h13l-3-3M17 17H4l3 3" stroke="currentColor" strokeWidth="1.7" strokeLinecap="round" strokeLinejoin="round" />
    </svg>
  );
}

export function RemoveLegIcon() {
  return (
    <svg viewBox="0 0 24 24" fill="none" aria-hidden>
      <path d="M6 6l12 12M18 6L6 18" stroke="currentColor" strokeWidth="1.8" strokeLinecap="round" />
    </svg>
  );
}

export function AddLegIcon() {
  return (
    <svg className="stroke-second" viewBox="0 0 24 24" width="16" height="16" fill="none" aria-hidden>
      <path d="M12 5v14M5 12h14" stroke="currentColor" strokeWidth="2" strokeLinecap="round" />
    </svg>
  );
}

export function SearchFlightsIcon() {
  return (
    <svg className="iconSize-20 fill-white" viewBox="0 0 28 28" fill="none" aria-hidden>
      <path
        d="M25.1184 23.8817L20.6372 19.4005C22.1352 17.6237 23.0417 15.3335 23.0417 12.8333C23.0417 7.20417 18.4625 2.625 12.8333 2.625C7.20417 2.625 2.625 7.20417 2.625 12.8333C2.625 18.4625 7.20417 23.0417 12.8333 23.0417C15.3335 23.0417 17.6237 22.1352 19.4005 20.6372L23.8816 25.1183C24.052 25.2887 24.276 25.375 24.5 25.375C24.724 25.375 24.948 25.2898 25.1184 25.1183C25.4602 24.7777 25.4602 24.2235 25.1184 23.8817ZM4.375 12.8333C4.375 8.169 8.169 4.375 12.8333 4.375C17.4977 4.375 21.2917 8.169 21.2917 12.8333C21.2917 17.4977 17.4977 21.2917 12.8333 21.2917C8.169 21.2917 4.375 17.4977 4.375 12.8333Z"
        fill="#F7F7F7"
      />
    </svg>
  );
}

/**
 * Magnifier for the search box inside the airport dropdown.
 *
 * Distinct from SearchFlightsIcon above, which is the white glyph on the filled
 * Search button: this one inherits `currentColor` so it sits quietly at the
 * left of an input rather than announcing itself.
 */
export function SearchSmallIcon() {
  return (
    <svg className="fs-dd-search-icon" width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden>
      <circle cx="7.2" cy="7.2" r="4.6" stroke="currentColor" strokeWidth="1.5" />
      <path d="m10.7 10.7 2.7 2.7" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" />
    </svg>
  );
}

/** Clears the dropdown's search box. Only rendered when there is something to clear. */
export function ClearSmallIcon() {
  return (
    <svg width="14" height="14" viewBox="0 0 14 14" fill="none" aria-hidden>
      <path d="m3.5 3.5 7 7m0-7-7 7" stroke="currentColor" strokeWidth="1.6" strokeLinecap="round" />
    </svg>
  );
}
