<.simple_form :let={f} for={@changeset} action={@action}>
  <.error :if={@changeset.action}>
    Oops, something went wrong! Please check the errors below.
  </.error>
  <h3 class="my-4 text-2xl text-black dark:text-white">
    General Options
  </h3>
  <.input field={f[:name]} type="text" label="Name" placeholder="New Profile" help="(required)" />
  <.input
    field={f[:output_path_template]}
    type="text"
    label="Output path template"
    help="TODO: provide docs (required)"
  />

  <h3 class="mb-4 mt-8 text-2xl text-black dark:text-white">
    Subtitle Options
  </h3>
  <.input field={f[:download_subs]} type="toggle" label="Download Subtitles" />
  <.input
    field={f[:download_auto_subs]}
    type="toggle"
    label="Download Autogenerated Subtitles"
    help="Prefers normal subs but will download autogenerated if needed"
  />
  <.input
    field={f[:embed_subs]}
    type="toggle"
    label="Embed Subtitles"
    help="Embeds subtitles in the video file itself, if supported"
  />
  <.input
    field={f[:sub_langs]}
    type="text"
    label="Subtitle Languages"
    help="Use commas for multiple languages (eg: en,de)"
  />

  <h3 class="mb-4 mt-8 text-2xl text-black dark:text-white">
    Thumbnail Options
  </h3>
  <.input field={f[:download_thumbnail]} type="toggle" label="Download Thumbnail" />
  <.input field={f[:embed_thumbnail]} type="toggle" label="Embed Thumbnail" />

  <h3 class="mb-4 mt-8 text-2xl text-black dark:text-white">
    Metadata Options
  </h3>
  <.input field={f[:download_metadata]} type="toggle" label="Download Metadata" />
  <.input field={f[:embed_metadata]} type="toggle" label="Embed Metadata" />

  <h3 class="mb-4 mt-8 text-2xl text-black dark:text-white">
    Release Format Options
  </h3>

  <.input
    field={f[:shorts_behaviour]}
    options={friendly_format_type_options()}
    type="select"
    label="Include Shorts?"
    help="Experimental"
  />
  <.input
    field={f[:livestream_behaviour]}
    options={friendly_format_type_options()}
    type="select"
    label="Include Livestreams?"
  />

  <h3 class="mb-4 mt-8 text-2xl text-black dark:text-white">
    Quality Options
  </h3>

  <.input
    field={f[:preferred_resolution]}
    options={friendly_resolution_options()}
    type="select"
    label="Preferred Resolution"
    help="Will grab the closest available resolution if your preferred is not available"
  />

  <:actions>
    <.button class="mt-15 mb-5 sm:mb-7.5">Save Media profile</.button>
  </:actions>
</.simple_form>
