import { Layout } from "ant-design-vue";
import { defineComponent } from "vue";
import HeaderComponent from "../components/Header";
import { css } from "@linaria/core";
import PageMenu from "../components/PageMenu";
const { Header, Content, Sider } = Layout;

export default defineComponent(() => {
  return () => (
    <Layout class={PageRoot}>
      <Header>
        <HeaderComponent />
      </Header>
      <Layout>
        <Sider class={SiderMenu}>
          <PageMenu />
        </Sider>
        <Content class={"page_content"}>
          <router-view></router-view>
        </Content>
      </Layout>
    </Layout>
  );
});
const PageRoot = css`
  height: 100vh;
  .ant-layout-header {
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    z-index: 3;
    padding: 0 20px;
  }
  .page_content {
    height: 100%;
    width: 100%;
    padding: 88px 24px 24px 224px;
    .ant-page-header {
      padding: 16px 0;
    }
  }
`;
const SiderMenu = css`
  position: fixed;
  left: 0;
  top: 0;
  padding-top: 64px;
  z-index: 2;
  overflow-y: auto;
  overflow-x: hidden;
  height: 100%;
  &.ant-layout-sider {
    background-color: #fff;
  }
  .ant-menu-inline {
    border-right: none;
  }
`;
