{% trans_default_domain 'contao_default' %}
<div class="cto-toolbar__open">
    <a href="#" title="{{ 'MSC.openToolbar'|trans }}">{{ include('@ContaoCore/Collector/contao.svg.twig', { fill: '#fff' }) }}</a>
</div>
<div
    class="cto-toolbar__inside"
    {% for key, value in attributes %}
        data-{{ key|e('html_attr') }}="{{ value }}"
    {% endfor %}
>
    <form action="{{ action }}" method="post" autocomplete="off">
        <div class="formbody">
            {% if badgeTitle %}
                <span class="badge-title">{{ badgeTitle }}</span>
            {% endif %}
            <input type="hidden" name="FORM_SUBMIT" value="tl_switch">
            <input type="hidden" name="REQUEST_TOKEN" value="{{ contao.request_token }}">
            <div>
                <button type="button" id="copyPublishedPath" class="tl_submit">{{ 'MSC.copyURL'|trans([], 'contao_default') }}</button>
                {% if share is not empty %}
                    <a href="{{ share }}" target="_blank" class="tl_submit cto-toolbar__share-url">{{ 'MSC.shareURL'|trans([], 'contao_default') }}</a>
                {% endif %}
            </div>
            {% if canSwitchUser %}
                <div>
                    <label for="ctrl_user">{{ 'MSC.feUser'|trans }}:</label>
                    <input type="text" name="user" id="ctrl_user" list="userlist" class="tl_text user" placeholder="{{ 'MSC.username'|trans }}" value="{{ user }}">
                    <datalist id="userlist"></datalist>
                </div>
            {% endif %}
            <div>
                <label for="ctrl_unpublished">{{ 'MSC.hiddenElements'|trans }}:</label>
                <select name="unpublished" id="ctrl_unpublished" class="tl_select">
                    <option value="hide">{{ 'MSC.hiddenHide'|trans }}</option>
                    <option value="show"{% if show %} selected{% endif %}>{{ 'MSC.hiddenShow'|trans }}</option>
                </select>
                <button type="submit" class="tl_submit">{{ 'MSC.apply'|trans }}</button>
            </div>
        </div>
    </form>
    <div class="cto-toolbar__close"><a href="#" title="{{ 'MSC.closeToolbar'|trans }}">&times;</a></div>
</div>
<div class="cto-toolbar__clear"></div>
