import Component from '../../component.js'
import CoUxBadge from './ux-badge.js'
import CoUxAdateTag from './ux-a-date-tag.js'
import Button from '../../button.js'

export default class CoUxNotificationItem extends Component {
    constructor(parent) {
      let selector = 'ux-notification-item';
      super(parent, selector);
      //https://citnet.tech.ec.europa.eu/CITnet/stash/projects/CSDR/repos/eui/browse/packages/components/src/lib/ux-components/ux-notifications/ux-notification-item.component.html
    }
    get dataE2E() {
      let path = '//div[@data-e2e="ux-notification-item"]';
      return this.currentPath + path;
    }
    get itemContent() {
      let path = '//div[contains(@class, "ux-notification__item-content")]';
      return this.dataE2E + path;
    }
    get itemLeftContent() {
      let path = '//div[contains(@class, "ux-notification__item-content-col--left")]';
      return this.itemContent + path;
    }
    get badgeCO() {
      return new CoUxBadge(this.itemLeftContent);
    }
    get badgeIconEnvelope() {
      let path = '//span[contains(@class, "ux-icon-envelope-o")]';
      return this.badgeCO.currentPath + path;
    }
    get dateTagCO() {
      return new CoUxAdateTag(this.itemLeftContent);
    }
    get itemCenterContent() {
      let path = '//div[contains(@class, "ux-notification__item-content-col--center")]';
      return this.itemContent + path;
    }
    get itemLink() {
      return (this.itemCenterContent + '/a');
    }
    get itemSubLabel() {
      return (this.itemLink + '//span');
    }
    get itemLabel() {
      let path = '//b';
      return this.itemLink + path;
    }
    get itemRightContent() {
      let path = '//div[contains(@class, "ux-notification__item-content-col--right")]';
      return this.itemContent + path;
    }
    get buttonCO() {
      return new Button(this.itemRightContent);
    }
    get markAsReadLabel() {
      let path = '/self::button[@class = "ux-notification__item-close"]';
      return  this.buttonCO.buttonData  + path;
    }
    get iosCloseEmpty() {
      let path = '//span[@class = "ion-ios-close-empty"]';
      return  this.buttonCO.buttonData  + path;
    }
}


