<div class="d-flex align-items-start">
    <div visit-moe relative class="d-block flex-grow-1">
        <form show url="/api/visitPoint/upsertChildReview" class="mcp-theme-1" right>
            <input type="hidden" name="uid" value="<?= $point->uid ?>">
            <input type="hidden" name="segmentUid" value="<?= $segment->uid ?>">
            <input type="hidden" name="data">

            <div class="mb-2">
                <label class="text-sm mb-0 font-weight-bold text-secondary">Frequency</label>
                <input type="text"
                       data-name="value"
                       value="<?= @($currentChildReview->data->value) ? trim(strip_tags($currentChildReview->data->value)) : (@($previousChildReview->data->value) ? trim(strip_tags($previousChildReview->data->value)) : '') ?>"
                       class="form-control form-control-sm min-width-unset">
            </div>
            <div class="mb-2">
                <label class="text-sm mb-0 font-weight-bold text-secondary">Experience</label>
                <input type="text"
                       data-name="experience"
                       value="<?= @($currentChildReview->data->experience) ? trim(strip_tags($currentChildReview->data->experience)) : (@($previousChildReview->data->experience) ? trim(strip_tags($previousChildReview->data->experience)) : '') ?>"
                       class="form-control form-control-sm min-width-unset">
            </div>

            <div class="d-none">
                <button submit class="btn btn-sm btn-primary mr-2">Save</button>
                <button cancel class="btn btn-sm btn-default border">Cancel</button>
            </div>
        </form>
    </div>
    <?php if(!empty($currentValue)): ?>
        <div visit-moe relative class="d-inline">
            <a start show href="#" class="pl-2 pr-1 text-center d-block" title="Undo Changes">
                <i class="fa fa-trash-alt text-danger on-hover-opaque"></i>
            </a>
            <form url="/api/visitPoint/destroyCurrentChildReview" class="mcp-theme-1" right>
                <input type="hidden" name="uid" value="<?= $point->uid ?>">

                <p class="mb-2">Undo Changes?</p>

                <div>
                    <button submit class="btn btn-sm btn-danger mr-2">Delete</button>
                    <button cancel class="btn btn-sm btn-default border">Cancel</button>
                </div>
            </form>
        </div>
    <?php endif; ?>
</div>

