<div visit-moe large class="d-inline">
    <a start show href="#" class="px-1 text-center d-block text-secondary on-hover-opaque" title="<?= $currentChildPlan ? 'Edit Plan' : 'Add Plan'?>">
        <i class="fa <?= $currentChildPlan ? 'fa-pencil-alt' : 'fa-plus-square'?>"></i>
    </a>
    <form url="/api/visitPoint/upsertChildPlan" class="mcp-theme-1 w-100" left>
        <input type="hidden" name="uid" value="<?= $point->uid ?>">
        <input type="hidden" name="segmentUid" value="<?= $segment->uid ?>">
        <input type="hidden" name="data">

        <p class="mb-2"><b>Plan</b></p>

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

        <div>
            <button submit class="btn btn-sm btn-primary mr-2"><i class="fa fa-save"></i></button>
            <button cancel class="btn btn-sm btn-default border">Cancel</button>
        </div>
    </form>
</div>
<?php if($currentChildPlan): ?>
    <div visit-moe relative class="d-inline">
        <a start show href="#" class="px-1 text-center d-block" title="Delete Plan">
            <i class="fa fa-trash-alt text-secondary on-hover-opaque"></i>
        </a>
        <form url="/api/visitPoint/destroyCurrentChildPlan" class="mcp-theme-1" right>
            <input type="hidden" name="uid" value="<?= $point->uid ?>">

            <p class="mb-2">Delete this plan?</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; ?>
