{% load i18n %}

{% translate "Research content gaps" %}

{% translate "5 credits" %}

{% translate "Find ranked content opportunities in a niche. Returns gaps that are" %} {% translate "underserved" %} {% translate "(no quality coverage) or" %} {% translate "stale" %} {% translate "(existing top videos are over a year old)." %}

{% csrf_token %}
{% if content_gap_niches %} {{ content_gap_niches|json_script:"cg-niche-data" }}
{% comment %} The trigger reuses .intel-input for chrome (border, padding, hover, focus ring) but .intel-input sets ``display: block`` which would push the chevron below the label on its own line. Inline-style the flex layout so the label + chevron sit on one row regardless of when .intel-input is parsed relative to the Tailwind ``flex`` utility. {% endcomment %}

{{ content_gap_niches|length }} {% translate "niche" %}{{ content_gap_niches|length|pluralize }} {% translate "available · click to browse, type to filter." %}

{% else %} {% comment %} Fallback path: Intel was unreachable when the page rendered, so we can't populate the combobox. Degrade to a free-form slug entry so the form is still usable, the user can type the slug directly. {% endcomment %}

{% translate "Couldn't load the niche catalog right now. Type a slug directly, or use the" %} {% translate "List niches" %} {% translate "tab to browse." %}

{% endif %}
{% translate "Gap types" %}

{% translate "Competitive is opt-in, usually means the topic already has plenty of strong recent videos." %}

{% translate "1–50 results." %}

{% translate "Drops gaps below this opportunity score." %}

{% if is_preview %}

{% if can_manage_billing %}{% translate "Activate Intelligence" %} {% translate "to research gaps in any niche you choose." %}{% else %}{% translate "Ask an admin to activate Intelligence to research gaps in any niche you choose." %}{% endif %}

{% endif %}

{% translate "Result" %}

{% if is_preview %} {% include "intelligence/_preview_badge.html" %} {% include "intelligence/_research_content_gaps_result.html" with result=preview_results.research_content_gaps %} {% else %} {% include "intelligence/_panel_empty_state.html" with hint="Submit a niche to see ranked opportunities." %} {% endif %}
{% if content_gap_niches %} {% endif %}