{% extends 'base.html.twig' %}
{% block body %}
{% if app.user %}
{% set isMuted = is_muted(profile, app.user) %}
{% set isFollow = is_follow(profile, app.user) %}
{% endif %}
{% include 'profile/partials/header.html.twig' %}
<div class="row">
<div class="col-12" id="profile-top-section">
{% if widgets.top is defined %}
{% for widget in widgets.top|sort((a, b) => a.sort <=> b.sort) %}
{{ widget.content|raw }}
{% endfor %}
{% endif %}
</div>
</div>
<div class="row">
<div class="col-12 col-md-9" id="profile-left-section">
{% if widgets.left is defined %}
{% for widget in widgets.left|sort((a, b) => a.sort <=> b.sort) %}
{{ widget.content|raw }}
{% endfor %}
{% endif %}
</div>
<div class="col-12 col-md-3">
{% if widgets.right is defined %}
{% for widget in widgets.right|sort((a, b) => a.sort <=> b.sort) %}
{{ widget.content|raw }}
{% endfor %}
{% endif %}
</div>
</div>
<div class="row">
<div class="col-12">
{% if widgets.bottom is defined %}
{% for widget in widgets.bottom|sort((a, b) => a.sort <=> b.sort) %}
{{ widget.content|raw }}
{% endfor %}
{% endif %}
</div>
</div>
{#
<div class="profile-in-feed card border-dark mb-3">
<div class="card-header float-right">
<a href="{{ path('profile', {slug: profile.slug}) }}">
[<i class="{{ profile.profileType.iconClass }}"></i> {{ profile.profileType.name }}] {{ profile.name }}
</a>{% if is_granted('ROLE_CREATOR', profile) %} <div class="btn-group">
<a role="button" class="btn btn-sm btn-small btn-outline-primary" href="{{ path('profile_edit', {id: profile.id}) }}">
<i class="fa fa-edit"></i> {% trans %}Edit{% endtrans %}
</a>
</div>{% endif %}</div>
<div class="card-body text-dark">
<div class="media">
<div class="media-body">
{{ profile.description }}
</div>
</div>
<h5 class="card-title">{% trans %}Offers services{% endtrans %}:</h5>
{% if profile.services | length == 0 %}
<div class="text-muted">{% trans %}This profile does not offer any service{% endtrans %}</div>
{% else %}
<div class="btn-group" role="group">
{% for service in profile.services %}
{% include 'profile/service_button.html.twig' with {service: service} %}
{% endfor %}
</div>
{% endif %}
{% if is_granted('ROLE_CREATOR', profile) %}
<a class="btn btn-sm btn-primary" href="{{ path('service_new', {id: profile.id}) }}">{% trans %}Create service{% endtrans %}</a>
{% endif %}
</div>
</div>
#}
{% if is_granted('ROLE_CREATOR', profile) == false and isMuted is defined %}
{% include 'profile/partials/buttons/muted.html.twig' %}
{% endif %}
{% endblock %}
{% block javascripts %}
{{ parent() }}
{{ encore_entry_script_tags('profile') }}
{% endblock %}
{% block stylesheets %}
{{ parent() }}
{{ encore_entry_link_tags('profile') }}
{% endblock %}