@page "/ribbon-tab"
@inject IStringLocalizer<RibbonTabs> Localizer

<h3>@Localizer["RibbonTabsTitle"]</h3>

<h4>@Localizer["RibbonTabsDescription"]</h4>

<DemoBlock Title="@Localizer["RibbonTabsNormalTitle"]"
           Introduction="@Localizer["RibbonTabsNormalIntro"]"
           Name="Normal">
    <RibbonTab Items="@NormalItems" />
</DemoBlock>

<DemoBlock Title="@Localizer["RibbonTabsFloatTitle"]"
           Introduction="@Localizer["RibbonTabsFloatIntro"]"
           Name="Float">
    <div style="height: 178.5px;">
        <RibbonTab Items="@FloatItems" ShowFloatButton="true" OnFloatChanged="OnFloatChanged">
            @Localizer["RibbonTabsFloatContent"]
        </RibbonTab>
    </div>
    <ConsoleLogger @ref="Logger" />
</DemoBlock>

<DemoBlock Title="@Localizer["RibbonTabsRightButtonsTemplateTitle"]"
           Introduction="@Localizer["RibbonTabsRightButtonsTemplateIntro"]"
           Name="RightButtonsTemplate">
    <RibbonTab Items="@RightItems" ShowFloatButton="true">
        <RightButtonsTemplate>
            <div class="ribbon-button">
                <i class="fa-regular fa-circle-question"></i>
                <span>@Localizer["RibbonTabsRightButtonsTemplateContent"]</span>
            </div>
        </RightButtonsTemplate>
    </RibbonTab>
</DemoBlock>

<DemoBlock Title="@Localizer["RibbonTabsHeaderClickTitle"]"
           Introduction="@Localizer["RibbonTabsHeaderClickIntro"]"
           Name="HeaderClick">
    <RibbonTab Items="@HeaderItems" OnMenuClickAsync="@OnMenuClickAsync">
        <div class="@FileClassString">@Localizer["RibbonTabsItemsText1"]</div>
        <div class="@EditClassString">@Localizer["RibbonTabsItemsText2"]</div>
    </RibbonTab>
</DemoBlock>

<DemoBlock Title="@Localizer["RibbonTabsAnchorTitle"]"
           Introduction="@Localizer["RibbonTabsAnchorIntro"]"
           Name="IsSupportAnchor">
    <section ignore>@((MarkupString)Localizer["RibbonTabsAnchorDesc"].Value)</section>
    <RibbonTab Items="@AnchorItems" IsSupportAnchor="true" EncodeAnchorCallback="EncodeAnchorCallback" DecodeAnchorCallback="DecodeAnchorCallback"></RibbonTab>
</DemoBlock>

<AttributeTable Items="@GetAttributes()" />
