<div class="logged-in-block ng-star-inserted">
  <div>
    <div placement="bottom-left auto" autoclose="outside" class="logged-in-more dropdown">
      <a href="/a/{{ ptFullHandle($res['userinfo']['me']->account) }}">
        <div class="dropdown-toggle" aria-expanded="false">
          <my-actor-avatar size="34">
            <img class="account avatar avatar-34 ng-star-inserted" src="{{ ptAvatar($res['userinfo']['me']->account) }}" alt="アカウントのアバター">
          </my-actor-avatar>
          <div class="logged-in-info">
            <div class="logged-in-display-name">{{ $res['userinfo']['me']->account->displayName }}</div>
            <div class="logged-in-username">{{ '@'.ptFullHandle($res['userinfo']['me']->account) }}</div>
          </div>
        </div>
      </a>
    </div>
    @include('layout.component.menu.top.notification')
  </div>
  <div class="logged-in-menu">
    <a class="menu-link" href="/my-account">
      <my-global-icon iconname="user" aria-hidden="true">
        <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-user"><path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"></path><circle cx="12" cy="7" r="4"></circle></svg>
      </my-global-icon>
      自分のアカウント
    </a>
    <a class="menu-link" href="/my-library">
      <my-global-icon iconname="channel" aria-hidden="true">
        <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-tv"><rect x="2" y="7" width="20" height="15" rx="2" ry="2"></rect><polyline points="17 2 12 7 7 2"></polyline></svg>
      </my-global-icon>
      自分のライブラリ
    </a>
    @if (!is_null($res['userinfo']) && (isset($res['userinfo']['me']) && !is_null($res['userinfo']['me']) && $res['userinfo']['me']->adminFlags == 1))
      <a class="menu-link ng-star-inserted" href="/admin/users">
        <my-global-icon iconname="cog" aria-hidden="true">
          <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-settings"><circle cx="12" cy="12" r="3"></circle><path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z"></path></svg>
        </my-global-icon>
        管理
      </a>
    @endif
    @if (!is_null($res['userinfo']) && (isset($res['userinfo']['me']) && !is_null($res['userinfo']['me'])))
      <a class="menu-link ng-star-inserted" href="/logout">
        <my-global-icon iconname="cog" aria-hidden="true">
          <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-log-out"><path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"></path><polyline points="16 17 21 12 16 7"></polyline><line x1="21" y1="12" x2="9" y2="12"></line></svg>
        </my-global-icon>
        ログアウト
      </a>
    @endif
  </div>
</div>
