<!DOCTYPE html>
<html>

<head>
    <noscript>
        <meta http-equiv="refresh" content="0; URL={{url('/no-script')}}" />
    </noscript>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <link href="{{ asset('/images/favicon.png') }}" rel="icon" />
    <title>@yield('title')</title>
	@style()
	<style>
		#langue .flags > li {
			padding: 20px 15px;
			display: block;
			line-height: 22px;
		}
		.flags li ul {
			top: 55px !important
		}
	</style>
    <!--[if lt IE 9]>
          <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
          <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
    <![endif]-->
</head>

<body>
    <div id="wrapper" class="clearfix">
        <!--col left-->
        <div id="col-left">
            <header id="left_header">
                <a href="{{ url('/') }}" target="_black">T-CMS</a>
            </header>
            <!--#left header-->
            <div id="content-col-left">
                <div class="logo clearfix">
                    <div class="pull-left profile">
                        <img onerror="this.src='{{asset('/elFinder/files/user.png')}}';" src="{{ asset($this->layoutUserAvatar) }}" />
                        <br />
                    </div>

                    <div class="pull-left white">
                        <div>
                            {{ $this->layoutUserNameLogin }}
                            <br />
                            @if(route_exist('/user/profile'))
                                <a href="{{ url('/user/profile') }}" style="font-size:11px;color:#A9A9A9">Thông tin cá nhân</a>
                            @endif
                        </div>
                    </div>
                </div>

                <nav id="menu" data-layout-menu-id="primary">
                    @menu('primary')
                </nav>
            </div>
            <footer id="footer-colleft">
                <div class="row">
                    <div class="col-xs-4">
                        <a href="{{ url('/') }}" title="Trang chủ"><i class="fa fa-home"></i></a>
                    </div>
                    <div class="col-xs-4">
                        @if(route_exist('/user/changepass'))
                            <a href="{{ url('/user/changepass') }}" title="Đổi mật khẩu"><i class="fa fa-key"></i></a>
                        @endif
                    </div>
                    <div class="col-xs-4">
                        <a href="{{ url('/logout') }}?redirect_url={{ full_url() }}" title="Thoát" class="logout"><i class="fa fa-power-off"></i></a>
                    </div>
                </div>
            </footer>
            <div id="areasubmenu">

            </div>
        </div>
        <!--col left-->


        <div id="col-main">
            <!--header-->
            <header id="right_header">
                <div class="padding-content">
                    <div class="pull-left">
                        <div id="togglemenu">
                            <i class="fa fa-bars"></i>
                        </div>
                    </div>
                    <!--.pull-left-->
                    <div class="pull-right">
						<li id="langue">
							@extension('select-language')
						</li>

                        <li id="userlogin" class="dropdown">
                            <div class="dropdown-toggle" data-toggle="dropdown">
                                <img onerror="this.src='{{asset('/elFinder/files/user.png')}}';" src="{{ asset($this->layoutUserAvatar) }}" class="img-circle" width="30" height="30" />

                                {{ $this->layoutUserNameLogin }}
                                <span class="fa fa-angle-down"></span>
                            </div>
                            <ul class="dropdown-menu" style="width:180px">
                                @if(route_exist('/user/profile'))
                                    <li><a href="{{ url('/user/profile') }}"><i class="fa fa-fw fa-user"></i> Thông tin cá nhân</a></li>
                                @endif
                                @if(route_exist('/user/changepass'))
                                    <li><a href="{{ url('/user/changepass') }}"><i class="fa fa-fw fa-key"></i> Đổi mật khẩu</a></li>
                                    <div class="divider"></div>
                                @endif
                                <li><a href="{{ base_url('/login') }}?redirect_url={{ full_url() }}"><i class="fa fa-fw fa-power-off"></i> Thoát</a></li>
                            </ul>
                        </li>
                    </div>
                    
                    <!--.pull-right-->
                </div>
            </header>
            <!--#right header-->


            <div id="main">
                <div id="brea">
                    @section('breadcrumb')
                </div>
                <div class="padding-content">
                    @body()
                </div>
            </div>
            <!--#main-->
        </div>
        <!--col main-->

        <footer id="footer">
            
        </footer>

    </div>
    <!--#Wrapper-->

    <script>
        var menuKey = 'menu-{{ module_name() }}-';
        var routeUrl = '@php $_routeUrl = $this->route("index"); echo $_routeUrl ? $_routeUrl : full_url(); @endphp';
    </script>
    
    @script()
    @section('script')
</body>
</html>