{% extends "index.html" %}

{% block content %}

Provide your Plaid client ID and at least the client secret corresponding to the Plaid environment you choose. <br>
Find your keys at the <a href="https://dashboard.plaid.com/team/keys" target="_blank">Plaid Dashboard</a>.<br><br>

<form action="{{ url_for('edit_plaid_credentials') }}" method="POST">
    <label for="plaid_client_id">Plaid Client ID:</label>
    <input type="text" name="plaid_client_id" placeholder="Client ID" size="24" required value="{{ plaid_client_id }}"><br>
    <label for="plaid_secret">Plaid Secret:</label>
    <input type="text" name="plaid_secret" placeholder="Secret" size="30" value="{{ plaid_secret }}"><br>
    <label for="status">Status:</label>
    {% if plaid_creds_valid %}
        <i class="fa-solid fa-check" style="color: green"></i><br>
    {% else %}
        <i class="fa-solid fa-xmark" style="color: red"></i><br>
    {% endif %}
    {% if plaid_env %}
        <label for="plaid_env">Plaid Environment: {{ plaid_env }}</label><br>
    {% endif %}
    <input type="submit" value="Save">
</form>

{% endblock %}
