{% extends "base.html" %}

{% block content %}
<div class="d-flex justify-content-between flex-wrap flex-md-nowrap align-items-center pt-3 pb-2 mb-3 border-bottom">
    <h1 class="h2">System Settings</h1>
</div>

<div class="card shadow-sm">
    <div class="card-body">
        <h5>CuraEngine Configurations</h5>
        <hr>
        <form method="POST" action="{{ url_for('admin.settings') }}">
            <div class="mb-3">
                <label for="offset_x" class="form-label">Plater Origin Offset X (mm)</label>
                <input type="number" class="form-control" name="offset_x" id="offset_x" value="{{ configs.get('offset_x', '0') }}">
                <div class="form-text">Adjust the X-axis compilation offset for combined files on the build plate.</div>
            </div>
            
            <div class="mb-3">
                <label for="offset_y" class="form-label">Plater Origin Offset Y (mm)</label>
                <input type="number" class="form-control" name="offset_y" id="offset_y" value="{{ configs.get('offset_y', '0') }}">
                <div class="form-text">Adjust the Y-axis compilation offset for combined files on the build plate.</div>
            </div>

            <button type="submit" class="btn btn-primary">Save Settings</button>
        </form>
    </div>
</div>
{% endblock %}
