/**
 * Header Component
 * Top bar with breadcrumbs and user info
 */

const { ref } = Vue;

export default {
  name: 'Header',
  props: ['title'],
  template: `
    <header class="admin-header">
      <div class="left">
        <div class="breadcrumb">
          <span>{{ settings.title }}</span>
          <span class="sep">/</span>
          <span class="current">{{ title }}</span>
        </div>
      </div>
      
      <div class="right">
        <div class="user-info">
          <i class="anticon anticon-user"></i>
          <span>管理员</span>
        </div>
      </div>
    </header>
  `,
  setup() {
    const settings = window.settings;
    return { settings };
  }
};
