<!--  Copyright (c) Microsoft Corporation and Contributors.  -->
<!--  Licensed under the MIT License.  -->

<UserControl
    x:Class="Peek.FilePreviewer.Controls.UnsupportedFilePreview"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:controls="using:Peek.FilePreviewer.Controls"
    xmlns:conv="using:Peek.Common.Converters"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:prev="using:Peek.FilePreviewer.Previewers"
    mc:Ignorable="d">

    <Grid
        Margin="24"
        HorizontalAlignment="Stretch"
        VerticalAlignment="Center">

        <controls:InformationalPreviewControl
            x:Name="InformationPreview"
            Source="{x:Bind Source, Mode=OneWay}"
            Visibility="{x:Bind IsVisibleIfStatesMatch(LoadingState, prev:PreviewState.Loaded), Mode=OneWay}" />

        <controls:FailedFallbackPreviewControl x:Name="FailedFallbackPreview" Visibility="{x:Bind IsVisibleIfStatesMatch(LoadingState, prev:PreviewState.Error), Mode=OneWay}" />
    </Grid>
</UserControl>
