@page
@model Admin.Pages.Config.ExternalModel

@{
    ViewData["Title"] = "API 설정";
}

<div class="container">
    <h3>@ViewData["Title"]</h3>
    <hr />

    <div asp-validation-summary="ModelOnly" class="text-danger"></div>
    <partial name="_StatusMessage" />
    <partial name="_Editor" />

    <form name="f_admin_write" id="fAdminWrite" class="mt-2" method="post" autocomplete="off" accept-charset="UTF-8">
        <div class="alert alert-secondary" role="alert">
            현재 운영 환경에 맞는 값을 입력해주세요.
        </div>

        <hr />

        <!-- YouTube -->
        <details open>
            <summary class="fs-5 mb-3">YouTube</summary>

            <div class="row mb-2">
                <label asp-for="Input.External.YouTubeApiName" class="col-sm-2 col-form-label">API Name</label>
                <div class="col-sm-10">
                    <input asp-for="Input.External.YouTubeApiName" type="text" class="form-control" />
                    <span asp-validation-for="Input.External.YouTubeApiName" class="text-danger"></span>
                </div>
            </div>

            <div class="row mb-2">
                <label asp-for="Input.External.YouTubeApiKeyEnc" class="col-sm-2 col-form-label">API Key</label>
                <div class="col-sm-10">
                    <input asp-for="Input.External.YouTubeApiKeyEnc" type="text" class="form-control" autocomplete="off" />
                    <span asp-validation-for="Input.External.YouTubeApiKeyEnc" class="text-danger"></span>
                </div>
            </div>
        </details>

        <hr />

        <!-- Google -->
        <details open>
            <summary class="fs-5 mb-3">Google OAuth 2.0</summary>

            <div class="row mb-2">
                <label asp-for="Input.External.GoogleClientId" class="col-sm-2 col-form-label">Google Client ID</label>
                <div class="col-sm-10">
                    <input asp-for="Input.External.GoogleClientId" type="text" class="form-control" />
                    <span asp-validation-for="Input.External.GoogleClientId" class="text-danger"></span>
                </div>
            </div>

            <div class="row mb-2">
                <label asp-for="Input.External.GoogleClientSecretEnc" class="col-sm-2 col-form-label">Google Client Secret</label>
                <div class="col-sm-10">
                    <input asp-for="Input.External.GoogleClientSecretEnc" type="text" class="form-control" autocomplete="off" />
                    <span asp-validation-for="Input.External.GoogleClientSecretEnc" class="text-danger"></span>
                </div>
            </div>

            <div class="row mb-2">
                <label asp-for="Input.External.GoogleAppId" class="col-sm-2 col-form-label">Google App ID</label>
                <div class="col-sm-10">
                    <input asp-for="Input.External.GoogleAppId" type="text" class="form-control" />
                    <span asp-validation-for="Input.External.GoogleAppId" class="text-danger"></span>
                </div>
            </div>
        </details>

        <hr />

        <div class="row">
            <div class="col text-center p-3">
                <button type="submit" class="btn btn-success">저장하기</button>
            </div>
        </div>

        <br />
    </form>
</div>

@section Scripts {
    @{

    }
}