<local:CenterPopup
    x:Class="Bili.App.Controls.Article.ArticleReaderView"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:loc="using:Bili.App.Resources.Extension"
    xmlns:local="using:Bili.App.Controls"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:muxc="using:Microsoft.UI.Xaml.Controls"
    d:DesignHeight="300"
    d:DesignWidth="400"
    Closed="OnClosed"
    PresenterMaxWidth="700"
    PresenterVerticalAlignment="Stretch"
    mc:Ignorable="d">

    <Grid CornerRadius="{StaticResource ControlCornerRadius}">
        <muxc:WebView2
            x:Name="ReaderWebView"
            VerticalAlignment="Stretch"
            WebMessageReceived="OnWebMessageReceivedAsync" />
        <local:OverlayLoadingPanel IsRingActive="{x:Bind ViewModel.IsReloading, Mode=OneWay}" />
        <local:ErrorPanel
            ActionButtonClick="OnArticleRefreshButtonClickAsync"
            ActionContent="{loc:Locale Name=Refresh}"
            Text="{x:Bind ViewModel.ErrorText}"
            Visibility="{x:Bind ViewModel.IsError, Mode=OneWay}" />
    </Grid>
</local:CenterPopup>
