@page "/economy-comparison"

@inherits BasePage

@implements IDisposable
@inject IEconomyComparisonService EconomyComparisonService
@layout PageLayout

<LayoutMediumContentComponent>
    <WebsiteTitleComponent>Economy Comparision</WebsiteTitleComponent>

    <PaperComponent>
        <div>You</div>
        <EconomyInputComponent ForPlayer="0"/>
    </PaperComponent>

    <PaperComponent>
        <div>Them</div>
        <EconomyInputComponent ForPlayer="1"/>
    </PaperComponent>

    <PaperComponent>
        <EconomyDifferenceComponent/>
    </PaperComponent>

    <PaperComponent>
        <ChartComponent/>
    </PaperComponent>

    <ContentDividerComponent/>

    <PaperComponent>
        <InfoBodyComponent>
            <InfoQuestionComponent>
                What is this tool for?
            </InfoQuestionComponent>
            <InfoAnswerComponent>
                Compare two economies together to determine best attack timing windows.
            </InfoAnswerComponent>
        </InfoBodyComponent>
    </PaperComponent>
</LayoutMediumContentComponent>

@code {

    protected override void OnInitialized()
    {
        base.OnInitialized();
        EconomyComparisonService.Subscribe(StateHasChanged);
    }

    void IDisposable.Dispose()
    {
        EconomyComparisonService.Unsubscribe(StateHasChanged);
    }

}