<aside id="aside" class="main-sidebar sidebar-dark-primary elevation-4">
    <!-- Brand Logo -->
    <a href="{{ route('dashboard') }}" class="brand-link">
      @if(auth()->user()->account)
      <account initial_balance="{{formatPrice(auth()->user()->account->balance)}}"    :id="{{auth()->user()->account->id}}"></account>
      @endif

      <?php 
      
        $office=App\Models\Office::find(auth()->user()->office_id);
        
      ?>
      @if(office())
        <account initial_balance="{{formatPrice($office->account->balance)}}"    :id="{{office()->account->id}}"></account>
      @endif
      <br>
      <p style="font-size:15px;text-align: center">{{config('app.name')}}</p>
    </a>

    <!-- Sidebar -->
    <div class="sidebar">
      <!-- Sidebar user panel (optional) -->
      <div class="user-panel mt-3 pb-3 mb-3 d-flex">
        <div class="image pt-2" style="position: relative">
          <img src="{{auth()->user()->image?'/uploads/'.auth()->user()->image:'/img/user2-160x160.jpg'}}" class="img-circle elevation-2" alt="User Image">
          <i  class="fa fa-circle text-success user-live"></i>
        </div>
        <div class="info">
          <a class="d-block" href="#">{{auth()->user()->name}}</a>
          <a class="d-block text-muted" style="font-size: 12px" href=" {{route('user.profile')}} ">{{auth()->user()->email}}</a>
        </div>
      </div>

      <!-- SidebarSearch Form -->
      <div class="form-inline">
        <div class="input-group" data-widget="sidebar-search">
          <input class="form-control form-control-sidebar" type="search" placeholder="{{__('Search')}}..." aria-label="Search">
          <div class="input-group-append">
            <button class="btn btn-sidebar">
              <i class="fas fa-search fa-fw"></i>
            </button>
          </div>
        </div>
      </div>

      <!-- Sidebar Menu -->
      <nav class="mt-2">
          <ul>
              <!--@can('setting')-->
                <li>seeting</li>
              <!--@endcan-->
          </ul>
            <admin-menu classe="nav nav-pills nav-sidebar flex-column" widget="treeview" :data="{{ json_encode(menu(), JSON_UNESCAPED_UNICODE) }}"></admin-menu>
        </nav>
      <!-- /.sidebar-menu -->
    </div>
    <!-- /.sidebar -->
  </aside>