var MasalarHeader = function (t) {
    return {
        items: [
            NavigationModel(icons.back, function () { return t.Navigation(screens.appmode_screen); }, "", 'col-sm-2 col-xs-3 col-md-2'),
            NavigationModel(icons.empty, function () { return null; }, "Masa seçiniz", 'col-sm-8 col-xs-6 col-md-8'),
            NavigationModel(icons.empty, function () { return null; }, "", 'col-sm-2 col-xs-3 col-md-2')
        ]
    };
};
var TransferHeader = function (t) {
    return {
        items: [
            NavigationModel(icons.back, function () { return t.transferBackButton(); }, "", 'col-sm-2 col-xs-3 col-md-2'),
            NavigationModel(icons.empty, function () { return null; }, "Hedef Masayı seçiniz", 'col-sm-8 col-xs-6 col-md-8'),
            NavigationModel(icons.empty, function () { return null; }, "", 'col-sm-2 col-xs-3 col-md-2')
        ]
    };
};

var HomeHeader = function (t) {
    return {
        items: [
            NavigationModel(icons.menu, function () { return t.IsOpenLoginModal() }, "", 'col-sm-2 col-xs-3 col-md-2'),
            NavigationModel(icons.empty, function () { return null; }, "MENU", 'col-sm-8 col-xs-6 col-md-8'),
            NavigationModel(icons.cart, function () { return t.OpenCart() }, CartInfo(t), 'col-sm-2 col-xs-3 col-md-2')
        ]
    };
}


var DefaultTopNavigation = function (t) {
    return {
        items: [NavigationModel()]
    }
}

var AdminTopNavigation = function (t) {
    return {
        items: [
            NavigationModel(icons.menu, function () { return t.IsOpenLoginModal() }, "", 'col-sm-2 col-xs-3 col-md-2'),
            NavigationModel(icons.empty, function () { return null; }, "Admin", 'col-sm-8 col-xs-6 col-md-8'),
            NavigationModel(icons.empty, function () { return null; }, "", 'col-sm-2 col-xs-3 col-md-2')
        ]
    };
}

var MenuItemsTopNavigation = function (t) {
    return {
        items: [
            NavigationModel(icons.back, function () { return t.DefaultNavigationChanges(); }, "Geri", 'col-sm-2 col-xs-3 col-md-2'),
            NavigationModel(icons.empty, function () { return null; }, t.SelectedMenuItem() && t.SelectedMenuItem().GADI || "", 'col-sm-8 col-xs-6 col-md-8'),
            NavigationModel(icons.cart, function () { return t.OpenCart(); }, CartInfo(t), 'col-sm-2 col-xs-3 col-md-2')
        ]
    };
}
var DetailTopNavigation = function (t) {
    return {
        items: [
            NavigationModel(icons.back, function () { return t.DefaultNavigationChanges(screens.menu_screen, screens.detail_screen); }, "Geri", 'col-sm-2 col-xs-3 col-md-2'),
            NavigationModel(icons.empty, function () { return null; }, t.SelectedSingleProduct() && t.SelectedSingleProduct().SADI() || "", 'col-sm-8 col-xs-6 col-md-8'),
            NavigationModel(icons.cart, function () { return t.OpenCart(); }, CartInfo(t), 'col-sm-2 col-xs-3 col-md-2')
        ]
    };
}
var CartTopNavigation  = function (t) {
    return {
        items: [
            NavigationModel(icons.back, function () { return t.DefaultNavigationChanges(); }, 'Geri', 'col-sm-2 col-xs-3 col-md-2'),
            NavigationModel(icons.empty, function () { return null; }, t.CartTitleText(), 'col-sm-8 col-xs-6 col-md-8'),
            NavigationModel(icons.delete, function () { return t.RemoveAllCart() }, "Sil", 'col-sm-2 col-xs-3 col-md-2'),
        ]
    };
}

var FinishTopNavigation = function (t) {
    return {
        items: [
            NavigationModel(icons.back, function () { return t.DefaultNavigationChanges(); }, '', 'col-sm-2 col-xs-3 col-md-2'),
            NavigationModel(icons.empty, function () { return null; }, "", 'col-sm-8 col-xs-6 col-md-8'),
            NavigationModel(icons.empty, function () { return null }, "", 'col-sm-2 col-xs-3 col-md-2'),
        ]
    };
}

var AppModeTopNavigation = function (t) {
    return {
        items: [
            NavigationModel(icons.menu, function () { return t.IsOpenLoginModal() }, "", 'col-sm-2 col-xs-3 col-md-2'),
            NavigationModel(icons.empty, function () { return null; }, "Mode Seçiniz", 'col-sm-8 col-xs-6 col-md-8'),
            NavigationModel(icons.empty, function () { return null; }, "", 'col-sm-2 col-xs-3 col-md-2')
        ]
    }
}

var AdisyonTopNavigation = function (t) {
    switch (t.SelectedMode()) {
        case modes.user:
            return {
                items: [
                    NavigationModel(icons.back, function () { return t.Navigation(screens.group_screen) }, "", 'col-sm-2 col-xs-3 col-md-2'),
                    NavigationModel(icons.empty, function () { return null; }, "Masa " + t.SelectedMasa() + " Adisyonu", 'col-sm-8 col-xs-6 col-md-8'),
                    NavigationModel(icons.empty, function () { return null; }, "", 'col-sm-2 col-xs-3 col-md-2')
                ]
            };
        default:
            return {
                items: [
                    NavigationModel(icons.back, function () { return t.Navigation(screens.masalar_screen) }, "", 'col-sm-2 col-xs-3 col-md-2'),
                    NavigationModel(icons.empty, function () { return null; }, "Masa " + t.SelectedMasa() + " Siparişleri", 'col-sm-8 col-xs-6 col-md-8'),
                    NavigationModel(icons.empty, function () { return null; }, "", 'col-sm-2 col-xs-3 col-md-2')
                ]
            };
    }
}

var CartInfo = function (t) {
    return "(" + (t.CartItems().length || 0) + ")";
}

