<?php require ROOT_PATH . '/admin/templates/header.php'; ?>

<div class="content-wrapper">
<section class="content pt-3">
<div class="container-fluid pb-5">

<div class="d-flex justify-content-between align-items-start gap-3 mb-4"><div><h3 class="mb-1 fw-bold"><i class="bi bi-meta text-primary me-2"></i><?= __('integrations.facebook.page_title','Facebook Pixel Settings') ?></h3></div></div>

<form method="post" action="<?= admin_url('facebook-pixel/save') ?>">
     <?= \Core\System\Csrf::field(); ?>
    <div class="card border-0 shadow-sm">
        <div class="card-header bg-white border-bottom py-3"><h6 class="mb-0 fw-semibold"><?= __('integrations.facebook.title','Facebook Pixel') ?></h6></div>

        <div class="card-body">
            <div class="form-group">
                <label><?= __('integrations.facebook.pixel_id','Pixel ID') ?></label>
                <input type="text"
                       name="pixel_id"
                       class="form-control"
                       value="<?= htmlspecialchars($facebook['pixel_id'] ?? '') ?>"
                       required>
            </div>

            <div class="form-group mt-3">
                <label>
                    <input type="checkbox"
                           name="is_active"
                           value="1"
                           <?= !empty($facebook['is_active']) ? 'checked' : '' ?>>
                    <?= __('integrations.facebook.enable','Enable Facebook Pixel') ?>
                </label>
            </div>
        </div>

        <div class="card-footer text-end">
            <button type="submit" class="btn btn-primary">
                <?= __('actions.save','Save') ?>
            </button>
        </div>
    </div>
</form>
<?php ?>
</div></section></div>
<?php require ROOT_PATH . '/admin/templates/footer.php'; ?>