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

@Component({
  selector: 'app-album',
  templateUrl: './album.page.html',
  styleUrls: ['./album.page.scss'],
})
export class AlbumPage implements OnInit {

  
  ngOnInit() {
  }

  imageRows: { url: string }[][];

  constructor() {
    this.imageRows = [
      [{ url: '/assets/img/man.jpg' }, { url: 'image2.jpg' }, { url: 'image3.jpg' }],
      [{ url: 'image4.jpg' }, { url: 'image5.jpg' }, { url: 'image6.jpg' }],
      [{ url: 'image7.jpg' }, { url: 'image8.jpg' }, { url: 'image9.jpg' }],
      [{ url: 'image10.jpg' }, { url: 'image11.jpg' }, { url: 'image12.jpg' }],
      [{ url: 'image13.jpg' }, { url: 'image14.jpg' }, { url: 'image15.jpg' }]
    ];
  }

  toggleLayout() {
    this.imageRows = this.imageRows[0].map((col, i) => this.imageRows.map(row => row[i]));
  }
}
