<?php include_once '../../helpers.php'; ?>

<div class="wrap">
    <h1 class="wp-heading-inline">Settings</h1>

    <div class="card">
        <p>
            Set your blue Window Content API Token to enable content deliveries to your WordPress site and to order translations in combination with the PolyLang plugin.
            Ask Blue Window Tech to retrieve your token</a>.
            Or speak to your account manager.
        </p>
        <br>

        <form method="post" action="<?php echo admin_url('admin-ajax.php'); ?>">

            <input name="action" value="bw_update_api_key" type="hidden">

            <label for="api_key">API Key</label>
            <input id="api_key" type="text" name="api_key" value="<?php  echo(Helpers::getBWApiKey()); ?>" required>

            <button type="submit">
                Save
            </button>
        </form>
    </div>
</div>