// Angular Core
import { Component, Input, OnInit } from '@angular/core';
import { environment } from 'src/environments/environment';

@Component({
  standalone: false,
  selector: 'app-package-description',
  templateUrl: './package-description.component.html',
  styleUrls: ['./package-description.component.scss']
})
export class PackageDescriptionComponent implements OnInit {

  @Input() row!:any;
  @Input() imgStyle?: string = 'cart-notice-img';
  imgUrl: string = environment.imageUrl;

  constructor() { }

  ngOnInit(): void {
  }

  //Display package description if the product is not a bottle
  checkDescription(packageDescription:string) {
    if (packageDescription !== null && packageDescription !== '' && packageDescription.trim().split(',')[0] !== 'bottle') {
        return true;
    } else {
        return false;
    }
  };

  toolTip:any = {
      title: "<b class='toolTipTitle'>PACKAGE DESCRIPTION: </b>"
  };

}
