@namespace wispro.sp.webclient
@inherits LayoutComponentBase

<AntDesign.ProLayout.BasicLayout Logo="@("images/小美logo-64-64.png")"
       MenuData="_menuData" Theme="MenuTheme.Light" Layout="AntDesign.ProLayout.Layout.Mix">
    
    <RightContentRender>
        <Menu Mode=MenuMode.Horizontal Theme="MenuTheme.Dark">
            <MenuItem Key="message">
                <div>
                    <a href="#">
                        <Badge Count="5" Size="small">
                            <Icon Type="mail"></Icon><span style="color:white">我的消息</span>
                        </Badge>
                    </a>
                </div>
            </MenuItem>
            <SubMenu TitleTemplate=@sub1Title>
                <MenuItem Key="setting:1" icon="setting">我的信息</MenuItem>
                <MenuItem Key="setting:2" icon="key">修改密码</MenuItem>
            </SubMenu>

        </Menu>

    </RightContentRender>
    <ChildContent>
        @Body
    </ChildContent>
    <FooterRender>
        <FooterView Copyright="2021 Ant Design Blazor" Links="Links"></FooterView>
    </FooterRender>
</AntDesign.ProLayout.BasicLayout>

@code
{

    RenderFragment sub1Title =
    @<Template>
        <Icon Type="user" Theme="outline"></Icon>
        我的配置
        <Icon Type="down" />
    </Template>;

private readonly MenuDataItem[] _menuData =
{
        new MenuDataItem
        {
            Path = "/",
            Name = "首页",
            Key = "index",
            Icon = "home",
        },
        new MenuDataItem
        {
            Path = "/FetchData",
            Name = "我的绩效",
            Key = "FetchData",
            Icon = "ordered-list",
        },        
        new MenuDataItem
        {
            Path = "/UploadData",
            Name = "上传绩效文档",
            Key = "upload",
            Icon = "upload",
        },
        new MenuDataItem
        {
            Name = "设置",
            Key = "staffManager",
            Icon = "setting",
            Children= new MenuDataItem[]
            {
                new MenuDataItem
                {
                    Path ="/StaffList",
                    Name ="账号管理",
                    Key= "staff",
                    Icon = ""
                },
                new MenuDataItem
                {
                    Path ="/StaffGrade",
                    Name ="代理人系数设定",
                    Key= "sg",
                    Icon = ""
                },
                new MenuDataItem
                {
                    Path ="/VerifyCeofficient",
                    Name ="核稿系数设定",
                    Key="vc",
                    Icon = ""
                }
                ,
                new MenuDataItem
                {
                    Path ="/VerifyCeofficient",
                    Name ="案件难度系数设定",
                    Key="vc",
                    Icon = ""
                }

            }
        }
    };

public LinkItem[] Links { get; set; } =
{
        new LinkItem
        {
            Key = "威世博官网",
            Title = "深圳威世博",
            Href = "https://www.weishibo.cn/",
            BlankTarget = true,
        },
        new LinkItem
        {
            Key = "patentics",
            Title = "Patentics数据库",
            Href = "https://www.patentics.com/",
            BlankTarget = true,
        },
        new LinkItem
        {
            Key = "合享数据库",
            Title = "合享数据库",
            Href = "https://www.incopat.com/intelLib/node/initIntelligentLib",
            BlankTarget = true,
        },
        new LinkItem
        {
            Key = "zhihuiya",
            Title = "智慧芽数据库",
            Href = "https://account.zhihuiya.com/",
            BlankTarget = true,
        }
    };
}