@model SceneEditViewModel

<form asp-controller="Scenes" asp-action="SaveSceneWorkflow" method="post" class="scene-inspector-editor-form" data-scene-editor-form>
    @Html.AntiForgeryToken()
    <input type="hidden" asp-for="SceneID" />

    <div class="scene-inspector-editor-error" data-scene-editor-error hidden></div>

    <div class="scene-inspector-editor-fields">
        <section class="scene-writer-editor-section">
            <div class="scene-writer-editor-heading">
                <span>Workflow</span>
            </div>

            <div class="scene-writer-editor-card">
                <div class="form-group">
                    <label for="Priority">Priority</label>
                    <input class="form-control form-control-sm" id="Priority" name="Priority" type="number" min="1" max="10" value="@Model.Workflow.Priority" />
                </div>

                <div class="scene-inspector-editor-grid">
                    <div class="form-group">
                        <label for="EstimatedWordCount">Estimated words</label>
                        <input class="form-control form-control-sm" id="EstimatedWordCount" name="EstimatedWordCount" type="number" min="0" value="@Model.Workflow.EstimatedWordCount" />
                    </div>
                    <div class="form-group">
                        <label for="ActualWordCount">Actual words</label>
                        <input class="form-control form-control-sm" id="ActualWordCount" name="ActualWordCount" type="number" min="0" value="@Model.Workflow.ActualWordCount" />
                    </div>
                </div>

                <div class="scene-inspector-editor-grid">
                    <div class="form-group">
                        <label for="DraftedDate">Drafted date</label>
                        <input class="form-control form-control-sm" id="DraftedDate" name="DraftedDate" type="date" value="@Model.Workflow.DraftedDate?.ToString("yyyy-MM-dd")" />
                    </div>
                    <div class="form-group">
                        <label for="LastWorkedOn">Last worked on</label>
                        <input class="form-control form-control-sm" id="LastWorkedOn" name="LastWorkedOn" type="date" value="@Model.Workflow.LastWorkedOn?.ToString("yyyy-MM-dd")" />
                    </div>
                </div>

                <label class="scene-writer-inline-check">
                    <input type="checkbox" name="IsBlocked" value="true" checked="@Model.Workflow.IsBlocked" />
                    <input type="hidden" name="IsBlocked" value="false" />
                    <span>Blocked</span>
                </label>

                <div class="form-group">
                    <label for="BlockedReason">Blocked reason</label>
                    <input class="form-control form-control-sm" id="BlockedReason" name="BlockedReason" value="@Model.Workflow.BlockedReason" />
                </div>
            </div>
        </section>
    </div>

    <div class="scene-inspector-editor-footer">
        <button type="button" class="btn btn-sm btn-outline-secondary" data-scene-editor-close>Cancel</button>
        <button type="submit" class="btn btn-sm btn-primary" data-scene-editor-save>Save workflow</button>
    </div>
</form>
