{% if profile is defined %}
{% set entity = profile %}
{% do tab_navigation_add({ name: 'timeline', action: 'timeline' }) %}
{% do tab_navigation_add({ name: 'achievements', action: 'achievements' }) %}
{% do tab_navigation_add({ name: 'news', action: 'news' }) %}
{% do tab_navigation_add({ name: 'network', action: 'network' }) %}
{# {% do tab_navigation_add({ name: 'references', action: 'references' }) %} #}
{# {% do tab_navigation_add({ name: 'team', action: 'team' }) %} #}
{% if
profile.profiles.racingManagerProfile
or profile.profiles.ownerProfile
or profile.profiles.trainerProfile
or profile.profiles.breederProfile %}
{% do tab_navigation_add({ name: 'horse-lists', action: 'horse_lists' }) %}
{# {% do tab_navigation_add({ name: 'horse-events', action: 'horse_events' }) %} #}
{% endif %}
{% if profile.profiles.auctionhouseProfile %}
{% do tab_navigation_add({ name: 'auctions', action: 'auctions' }) %}
{% endif %}
{% if profile.profiles.racetrackProfile %}
{% do tab_navigation_add({ name: 'racedays', action: 'raceday_list' }) %}
{% endif %}
{% endif %}
<section id="tab_navigation"
class="{{ profile and profile.color ? '' : 'bg-primary-500' }} mb-4"
style="background-color: {{ profile and profile.color ? profile.color : '' }};">
<div class=" sm:flex-wrap sm:container sm:flex hidden w-full gap-4 p-4 {{
profile and profile.color
? ''
: 'bg-primary-500'
}}"
style="background-color: {{ profile and profile.color ? profile.color : '' }};"
data-controller="tab-navigation">
{% for item in tab_navigation_get() %}
{% set highlighted = null %}
{% if highlightedTab is defined %}
{% set highlighted = highlightedTab
== path('profile_tab_navigation_' ~ item.action, { id: entity.id })
%}
{% endif %}
<turbo-frame class="{{ not highlighted ? 'bg-white' }}" target="tab_content">
<a id="{{ item.name ~ '-' ~ profile.id }}"
href="{{ path('profile_tab_navigation_' ~ item.action, { id: entity.id }) }}"
class="{{ highlighted ? 'btn-sm btn btn-white active' : 'btn-sm btn btn-neutral' }} "
style="{{
not highlighted
? 'color:white; background-color: rgba(' ~ profile.color.r ~ ',' ~ profile.color.g
~ ','
~ profile.color.b
~ ',0.6'
}}">
{{ item.name|trans }}
</a>
</turbo-frame>
{% endfor %}
</div>
<div>
<div class="block sm:hidden sticky top-20 w-screen max-w-full z-1000 {{
profile and profile.color
? ''
: 'bg-primary-500'
}} overflow-hidden shadow-md"
style="background-color: {{ profile and profile.color ? profile.color : '' }};">
<div data-controller="tab-navigation"
data-section-navigation-active-class="text-white bg-black"
data-section-navigation-inactive-class="text-black bg-neutral-200 "
id="profile-scroll-bar"
class="relative inline-flex items-center w-screen gap-4 p-3 mx-1 overflow-scroll sm:my-3 snap-x snap-mandatory sm:flex">
{% for item in tab_navigation_get() %}
{% set highlighted = null %}
{% if highlightedTab is defined %}
{% set highlighted = highlightedTab
== path('profile_tab_navigation_' ~ item.action, { id: profile.id })
%}
{% endif %}
<turbo-frame class=" w-fit min-w-fit {{ not highlighted ? 'bg-white' }}"
target="tab_content">
<a href="{{ path('profile_tab_navigation_' ~ item.action, { id: profile.id }) }}"
class="flex-none p-3 text-sm font-medium tracking-widest {{
highlighted
? 'btn-sm btn btn-white active'
: 'btn-sm btn btn-neutral inactive'
}} uppercase snap-center"
style="{{
not highlighted
? 'color:white; background-color: rgba(' ~ profile.color.r ~ ',' ~ profile.color.g
~ ','
~ profile.color.b
~ ',0.6'
}}">
{{ item.name|trans }}
</a>
</turbo-frame>
{% endfor %}
</div>
</div>
</div>
{# <div class="flex items-center gap-8">
<div class="hidden md:block">
{% include 'icons/arrow-right-tail.svg.twig' with { class: 'w-6 rotate-180 ' } %}
</div>
<div class="sticky block w-screen max-w-full overflow-hidden top-20 z-1000">
<div data-controller="tab-navigation"
data-section-navigation-active-class="text-white bg-black"
data-section-navigation-inactive-class="text-black bg-neutral-200 "
id="profile-scroll-bar"
class="relative inline-flex items-center gap-4 p-3 overflow-scroll sm:my-3 snap-x snap-mandatory sm:flex">
{% for item in tab_navigation_get() %}
{% set highlighted = null %}
{% if highlightedTab is defined %}
{% set highlighted = highlightedTab
== path('profile_tab_navigation_' ~ item.action, { id: profile.id })
%}
{% endif %}
<turbo-frame class="py-2 w-fit min-w-fit" target="tab_content">
<a href="{{ path('profile_tab_navigation_' ~ item.action, { id: profile.id }) }}"
style="{{ highlighted ? 'color:white; background-color:' ~ profile.color }}"
class="flex-none p-3 text-sm font-medium tracking-widest {{
highlighted
? 'btn-primary btn btn-sm active'
: 'btn-neutral btn btn-sm inactive'
}} uppercase snap-center snap-always">
{{ item.name|trans }}
</a>
</turbo-frame>
{% endfor %}
</div>
</div>
<div class="hidden md:block">
{% include 'icons/arrow-right-tail.svg.twig' with { class: 'w-6' } %}
</div>
</div> #}
</section>