<div class="otherBody">
    <!--ko foreach:$root.GroupedCartItems-->
    <h4 class="followTitleBg" style="margin-bottom: 0px;margin-top: 0px;">
        <span style="float:left;" data-bind="text:$data.key() == '0' ? 'Ortak Siparisler' : 'Kişi No:'+ $data.key()"></span>
        <span style="float:right;padding-right:15px;" data-bind="text:$data.list().length + ' Ürün' "></span>
    </h4>
    <!--ko foreach:$data.list-->
    <div class="col-xs-12 col-md-12 col-sm-12 groupItem">
        <div class="col-xs-8 col-sm-9 col-md-9 pl5 pr5" data-bind="style:{'margin-top': $data.Extras && $data.Extras().length > 0 ? '0px' : '0px' }" style="">
            <div class="col-xs-1 col-sm-1 col-md-1">
                <div style="text-align:center" class="row" data-bind="click:$root.RemoveFromCart">
                    <img src="../../../Upload/icon/close.png" style="max-height:20px" />
                </div>
                <div style="text-align:center" class="row" data-bind="click:$data.AfterAdd.bind($root,!$data.AfterAdd())">
                    <img style="max-height:25px" data-bind="attr:{src:$data.AfterAdd() ? icons.minus : icons.plus}">

                </div>
            </div>
            <div class="col-xs-10 col-sm-10 col-md-10" style="padding: 0px;" data-bind="style:{'margin-top': !$data.AfterAdd() && $data.Extras && $data.Extras().length == 0 ? '20px' : ''}">
                <div class="cartItemName" data-bind="text:$data.Name"></div>
                <!--ko if:$data.AfterAdd-->
                <div class="col-xs-4 col-sm-6 col-md-6" style="padding:0px">
                    <input type="text" class="form-control defaultTextbox" data-bind="textInput: $data.Query, returnAction:$root.enterKey" />
                </div>
                <div class="col-xs-4 col-sm-4 col-md-4" style="margin:0px; padding:0px">
                    <button class="btn btn-default btn-sm btn-block" style="height:36px; margin:0px; border-radius:0px" data-bind="click: $root.enterKey ">Ekle</button>
                </div>
                <!--/ko-->
                <!--ko foreach:$data.Extras-->
                <div class="col-xs-10 col-md-10 col-sm-10" style="font-size:14px;text-transform:lowercase" data-bind="text:'Ex: '+ $data.Name(),css:$data.extraCount() == '1' ? '' : 'noExtra'"></div>
                <div class="col-xs-2 col-md-2 col-sm-2 nopadding" data-bind="click:$root.RemoveExtras.bind($root,$parents[0],$index(),$data)">
                    <img src="../../../Upload/icon/close.png" style="max-height:15px;" />
                </div>
                <!--/ko-->
            </div>
        </div>

        <div class="col-xs-4 col-sm-3 col-md-3" style="text-align: center;padding: 2px;">
            <h4 style=" margin-bottom: 5px; font-size:13px" data-bind="text:$data.Price() +' x '+ $data.Quantity() + ' = ' +  $data.DisplayPrice()"></h4>
            <!--ko foreach:$data.Extras-->
            <!--ko if:$data.Price() > 0 -->
            <div class="col-xs-12 col-md-12 col-sm-12 " style="margin-bottom: 5px; font-size:13px;" data-bind="text:'Ex: '+ $data.Price() + ' tl',css:$data.extraCount() == '1' ? '' : 'noExtra'"></div>
            <!--/ko-->
            <!--/ko-->
            <div class="btn-group" role="group" aria-label="Basic example" data-bind="click:function(e,ev) { ev.stopPropagation();}" style="margin:2px">
                <button type="button" class="btn btn-default btn-sm"
                        data-bind="click:$root.CartDown">
                    <img src="../../../Upload/icon/minus_circle_black.png" style="max-height:20px;" />
                </button>
                <button type="button" class="btn btn-default btn-sm" data-bind="click:$root.CartUp">
                    <img src="../../../Upload/icon/plus_circle.png" style="max-height:20px;" />
                </button>
            </div>
            
        </div>
    </div>
    <!--/ko-->
    <h4 class="cartFooterTotalDiv">
        <!--ko foreach:$data.Prices-->
        <span data-bind="text:$data.value() +' '+ $data.key() "></span>
        <!--/ko-->
        @*<span data-bind="text:'Toplam =' + $data.TotalPriceText+ ' TL'" class="col-xs-12 col-sm-12 col-md-12 cartFooterTotalText"></span>*@
    </h4>
    <!--/ko-->
</div>
<nav class="navbar navbar-default navbar-fixed-bottom navbarFooter" role="navigation">
    <div class="row">
        <div class="col-xs-6" style="padding: 2px;">
            <button class="btn btn-danger btnHeight btn-block btnFooterHeight" type="button" data-bind="click:function(){ $root.cartItems([]);}">Siparişleri Sil</button>
        </div>
        <div class="col-xs-6" style="padding: 2px;">
            <button class="btn btn-danger btnHeight btn-block btnFooterHeight" type="button" data-bind="text:'Devam Et',click:$root.CartNext"></button>
        </div>
    </div>
</nav>