import { Component, OnInit } from '@angular/core';
import { Location } from '@angular/common';

@Component({
    selector: 'app-shop',
    templateUrl: './shop.page.html',
    styleUrls: ['./shop.page.scss'],
})
export class ShopPage implements OnInit {
    products: Array<{
        name: string,
        price: number,
        image: string,
        link: string,
    }> = [];

    constructor(
        private location: Location
    ) { }

    back() {
        this.location.back();
    }

    ngOnInit() {

        this.products = [{
            name: 'KXIP Jersy',
            price: 300,
            image: 'https://www.kxip.in/static-assets/images/product/player-replica-jersey-ed-2020-front.jpg',
            link: 'https://www.t10sports.com/index.php?route=product/product&path=196_214&product_id=1530',
        }, {
            name: 'KXIP Practice Jersey',
            price: 300,
            image: 'https://www.kxip.in/static-assets/images/product/kxip-player-replica-practice-jersey-2020.jpg',
            link: 'https://www.t10sports.com/index.php?route=product/product&path=196_214&product_id=1530'
        }, {
            name: 'KXIP Track suit',
            price: 300,
            image: 'https://www.kxip.in/static-assets/images/product/kxip-replica-active-tracksuit-ed-2020.jpg',
            link: 'https://www.t10sports.com/index.php?route=product/product&path=196_214&product_id=1530',
        }, {
            name: 'KXIP Track top',
            price: 300,
            image: 'https://www.kxip.in/static-assets/images/product/KXIP-Replica-Active-Track-Top-Ed-2020.jpg',
            link: 'https://www.t10sports.com/index.php?route=product/product&path=196_214&product_id=1530'
        }];

    }

}
