@model economy.Models.View<economy.Models.International.Request, economy.Models.International.Response>

@{
    ViewData["Title"] = "국제 금리";
}

<div class="container">
    <h3>국제 금리</h3>

    @await Html.PartialAsync("NavTab")

    <div class="row mt-3 mb-3">
        <div class="col-auto">
            <input type="date" name="date" id="date" class="form-control" value="@Model.Request.DateFormatted" form="fSearch" />
        </div>
    </div>


    <p>
        한국수출입은행이 제공하는 국제 금리 정보입니다.
        각 대출기간에 대한 고정기준금리를 일 기준으로 제공합니다.
    </p>

    <div id="financialInternational" class="row row-cols-sm-1 row-cols-md-2 row-cols-lg-3 row-cols-xl-4">
        <div class="col">
            <table class="table table-bordered table-hover">
                <thead>
                    <tr>
                        <th>통화</th>
                        <th>기준</th>
                        <th>금리</th>
                    </tr>
                </thead>
                <tbody>
                        @if (Model.Response?.SofrList != null && Model.Response?.SofrList.Count() > 0)
                    {
                        @foreach (var row in Model.Response.SofrList)
                        {
                            <tr>
                                <td>@row.CurFund</td>
                                <td>@row.InterestName</td>
                                <td>@row.InterestRate</td>
                            </tr>
                        }
                    }
                    else
                    {
                        <tr>
                            <td colspan="3">
                                No data.
                            </td>
                        </tr>
                    }
                </tbody>
            </table>
        </div>

        <div class="col">
            <table class="table table-bordered table-hover">
                <thead>
                    <tr>
                        <th>통화</th>
                        <th>기준</th>
                        <th>금리</th>
                    </tr>
                </thead>
                <tbody>
                        @if (Model.Response?.EstrList != null && Model.Response?.EstrList.Count() > 0)
                    {
                        @foreach (var row in Model.Response.EstrList)
                        {
                            <tr>
                                <td>@row.CurFund</td>
                                <td>@row.InterestName</td>
                                <td>@row.InterestRate</td>
                            </tr>
                        }
                    }
                    else
                    {
                        <tr>
                            <td colspan="3">
                                No data.
                            </td>
                        </tr>
                    }
                </tbody>
            </table>
        </div>

        <div class="col">
            <table class="table table-bordered table-hover">
                <thead>
                    <tr>
                        <th>통화</th>
                        <th>기준</th>
                        <th>금리</th>
                    </tr>
                </thead>
                <tbody>
                        @if (Model.Response?.EuriborList != null && Model.Response?.EuriborList.Count() > 0)
                    {
                        @foreach (var row in Model.Response.EuriborList)
                        {
                            <tr>
                                <td>@row.CurFund</td>
                                <td>@row.InterestName</td>
                                <td>@row.InterestRate</td>
                            </tr>
                        }
                    }
                    else
                    {
                        <tr>
                            <td colspan="3">
                                No data.
                            </td>
                        </tr>
                    }
                </tbody>
            </table>
        </div>

        <div class="col">
            <table class="table table-bordered table-hover">
                <thead>
                    <tr>
                        <th>통화</th>
                        <th>기준</th>
                        <th>금리</th>
                    </tr>
                </thead>
                <tbody>
                    @if (Model.Response?.TonaList != null && Model.Response?.TonaList.Count() > 0)
                    {
                        @foreach (var row in Model.Response.TonaList)
                        {
                            <tr>
                                <td>@row.CurFund</td>
                                <td>@row.InterestName</td>
                                <td>@row.InterestRate</td>
                            </tr>
                        }
                    }
                    else
                    {
                        <tr>
                            <td colspan="3">
                                No data.
                            </td>
                        </tr>
                    }
                </tbody>
            </table>
        </div>

        <div class="col">
            <table class="table table-bordered table-hover">
                <thead>
                    <tr>
                        <th>통화</th>
                        <th>기준</th>
                        <th>금리</th>
                    </tr>
                </thead>
                <tbody>
                    @if (Model.Response?.TiborList != null && Model.Response?.TiborList.Count() > 0)
                    {
                        @foreach (var row in Model.Response.TiborList)
                        {
                            <tr>
                                <td>@row.CurFund</td>
                                <td>@row.InterestName</td>
                                <td>@row.InterestRate</td>
                            </tr>
                        }
                    }
                    else
                    {
                        <tr>
                            <td colspan="3">
                                No data.
                            </td>
                        </tr>
                    }
                </tbody>
            </table>
        </div>

        <div class="col">
            <table class="table table-bordered table-hover">
                <thead>
                    <tr>
                        <th>통화</th>
                        <th>기준</th>
                        <th>금리</th>
                    </tr>
                </thead>
                <tbody>
                    @if (Model.Response?.SwapRfrList != null && Model.Response?.SwapRfrList.Count() > 0)
                    {
                        @foreach (var row in Model.Response.SwapRfrList)
                        {
                            <tr>
                                <td>@row.CurFund</td>
                                <td>@row.InterestName</td>
                                <td>@row.InterestRate</td>
                            </tr>
                        }
                    }
                    else
                    {
                        <tr>
                            <td colspan="3">
                                No data.
                            </td>
                        </tr>
                    }
                </tbody>
            </table>
        </div>

        <div class="col">
            <table class="table table-bordered table-hover">
                <thead>
                    <tr>
                        <th>통화</th>
                        <th>기준</th>
                        <th>금리</th>
                    </tr>
                </thead>
                <tbody>
                    @if (Model.Response?.LiborList != null && Model.Response?.LiborList.Count() > 0)
                    {
                        @foreach (var row in Model.Response.LiborList)
                        {
                            <tr>
                                <td>@row.CurFund</td>
                                <td>@row.InterestName</td>
                                <td>@row.InterestRate</td>
                            </tr>
                        }
                    }
                    else
                    {
                        <tr>
                            <td colspan="3">
                                No data.
                            </td>
                        </tr>
                    }
                </tbody>
            </table>
        </div>

        <div class="col">
            <table class="table table-bordered table-hover">
                <thead>
                    <tr>
                        <th>통화</th>
                        <th>기준</th>
                        <th>금리</th>
                    </tr>
                </thead>
                <tbody>
                    @if (Model.Response?.SwapList != null && Model.Response?.SwapList.Count() > 0)
                    {
                        @foreach (var row in Model.Response.SwapList)
                        {
                            <tr>
                                <td>@row.CurFund</td>
                                <td>@row.InterestName</td>
                                <td>@row.InterestRate</td>
                            </tr>
                        }
                    }
                    else
                    {
                        <tr>
                            <td colspan="3">
                                No data.
                            </td>
                        </tr>
                    }
                </tbody>
            </table>
        </div>

        <div class="col">
            <table class="table table-bordered table-hover">
                <thead>
                    <tr>
                        <th>통화</th>
                        <th>기준</th>
                        <th>금리</th>
                    </tr>
                </thead>
                <tbody>
                    @if (Model.Response?.CirrList != null && Model.Response?.CirrList.Count() > 0)
                    {
                        @foreach (var row in Model.Response.CirrList)
                        {
                            <tr>
                                <td>@row.CurFund</td>
                                <td>@row.InterestName</td>
                                <td>@row.InterestRate</td>
                            </tr>
                        }
                    }
                    else
                    {
                        <tr>
                            <td colspan="3">
                                No data.
                            </td>
                        </tr>
                    }
                </tbody>
            </table>
        </div>
    </div>
    

    <form id="fSearch" method="get" accept-charset="UTF-8" rel="search" autocomplete="off" asp-controller="Financial" asp-action="International"></form>
</div>

@section Scripts {
    <script src="~/js/financial.js" asp-append-version="true"></script>
}
@section Styles {
    <link href="~/css/style.css" rel="stylesheet" asp-append-version="true" />
}