<div class="blade-static __bottom" ng-include="'$(Platform)/Scripts/common/templates/create.tpl.html'" ng-if="blade.isNew"></div>
<div class="blade-content __medium-wide">
    <div class="blade-inner">
        <div class="inner-block">
            <form class="form" name="formScope">
                <div class="columns clearfix">
                    <div class="column">
                        <div class="form-group" ng-init="setForm(formScope)">
                            <label class="form-label">{{'pricing.blades.assignment-detail.labels.assignment-name' | translate}}</label>
                            <div class="form-input">
                                <input ng-model="blade.currentEntity.name" required placeholder="{{'pricing.blades.assignment-detail.placeholders.assignment-name' | translate}}" />
                            </div>
                        </div>
                        <!--Store-->
                        <div class="form-group">
                            <label class="form-label">{{'pricing.blades.assignment-detail.labels.store' | translate}}</label>
                            <ui-scroll-drop-down data="storeDataSource(criteria)"
                                                 placeholder="'pricing.blades.assignment-detail.placeholders.store'"
                                                 ng-model="blade.currentEntity.storeId"
                                                 disabled="blade.currentEntity.catalogId">
                            </ui-scroll-drop-down>
                        </div>
                        <!--Priority-->
                        <div class="form-group">
                            <label class="form-label">{{'pricing.blades.assignment-detail.labels.priority' | translate}}</label>
                            <div class="form-input __number list __info">
                                <input smart-float num-type="integer" required ng-model="blade.currentEntity.priority" type="text">
                                <div class="list-descr">{{'pricing.blades.assignment-detail.labels.priority-description' | translate}}</div>
                            </div>
                        </div>
                    </div>
                    <div class="column">
                        <!--PriceList-->
                        <div class="form-group">
                            <label class="form-label">{{'pricing.blades.assignment-detail.labels.price-list' | translate}}</label>
                            <ui-scroll-drop-down data="pricelistDataSource(criteria)"
                                                 placeholder="'pricing.blades.assignment-detail.placeholders.price-list'"
                                                 ng-model="blade.currentEntity.pricelistId"
                                                 required>
                            </ui-scroll-drop-down>
                        </div>
                        <!--Catalog-->
                        <div class="form-group">
                            <label class="form-label">{{'pricing.blades.assignment-detail.labels.catalog' | translate}}</label>
                            <ui-scroll-drop-down data="catalogDataSource(criteria)"
                                                 placeholder="'pricing.blades.assignment-detail.placeholders.catalog'"
                                                 ng-model="blade.currentEntity.catalogId"
                                                 disabled="blade.currentEntity.storeId">
                            </ui-scroll-drop-down>
                        </div>
                    </div>
                </div>
                <div class="form-group" style="padding-top: 10px;">
                    <label class="form-label">{{'pricing.blades.assignment-detail.labels.description' | translate}}</label>
                    <div class="form-input">
                        <textarea class="form-control" cols="30" rows="3" ng-model="blade.currentEntity.description" placeholder="{{'pricing.blades.assignment-detail.placeholders.description' | translate}}"></textarea>
                    </div>
                </div>
                <div class="form-group columns clearfix">
                    <div class="column">
                        <div class="form-group">
                            <label class="form-label">{{'pricing.blades.assignment-detail.labels.enable-date' | translate}}</label>
                            <div class="form-input __calendar">
                                <input type="text" class="form-control" ng-model="blade.currentEntity.startDate" datepicker-popup="" is-open="datepickers.str" />
                                <button class="btn" type="button" ng-click="open($event,'str')">
                                    <em class="btn-ico far fa-calendar-alt"></em>
                                </button>
                                <div class="list __info">
                                    <div class="list-descr">{{'pricing.blades.assignment-detail.labels.enable-date-description' | translate}}</div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="column">
                        <div class="form-group">
                            <label class="form-label">{{'pricing.blades.assignment-detail.labels.expiration-date' | translate}}</label>
                            <div class="form-input __calendar">
                                <input type="text" class="form-control" ng-model="blade.currentEntity.endDate" datepicker-popup="" is-open="datepickers.end" />
                                <button class="btn" type="button" ng-click="open($event,'end')">
                                    <em class="btn-ico far fa-calendar-alt"></em>
                                </button>
                                <div class="list __info">
                                    <div class="list-descr">{{'pricing.blades.assignment-detail.labels.expiration-date-description' | translate}}</div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="form-group" ng-if="blade.currentEntity.dynamicExpression">
                    <fieldset>
                        <legend>{{'pricing.blades.assignment-detail.labels.eligible-shoppers' | translate}}</legend>
                        <div class="dynamic-expression">
                            <va-dynamic-expression-tree source="blade.currentEntity.dynamicExpression"></va-dynamic-expression-tree>
                        </div>
                    </fieldset>
                </div>
            </form>
        </div>
    </div>
</div>