import Component from '../component.js'
import CoEuiCardHeader from './eui-card-header.js'
import CoEuiCardMedia from './eui-card-media.js'
import CoEuiCardContent from './eui-card-content.js'
import CoEuiCardFooter from './eui-card-footer.js'
import { elementAttributeContains } from '../../core/utils.js'

export default class CoEuiCard extends Component {
  constructor(parent) {
    let selector = 'eui-card';
    super(parent, selector);
    // https://citnet.tech.ec.europa.eu/CITnet/stash/projects/CSDR/repos/eui/browse/packages/components/eui-card/eui-card.component.html
  }
  get euiCardHeaderCO() {
    return new CoEuiCardHeader(this.currentPath);
  }
  get euiCardMediaCO() {
    return new CoEuiCardMedia(this.currentPath);
  }
  get euiCardContentCO() {
    return new CoEuiCardContent(this.currentPath);
  }
  get euiCardFooterCO() {
    return new CoEuiCardFooter(this.currentPath);
  }
  async isCollapsible() {
    return await elementAttributeContains(this.currentPath, 'class', 'eui-card--collapsible');
  }
  async isCollapsed() {
    return await elementAttributeContains(this.currentPath, 'class', 'eui-card--collapsed');
  }
  async isSelected() {
    return await elementAttributeContains(this.currentPath, 'class', 'eui-card--selected');
  }
  async isUrgent() {
    return await elementAttributeContains(this.currentPath, 'class', 'eui-card--urgent');
  }
  async isNoShadow() {
    return await elementAttributeContains(this.currentPath, 'class', 'eui-card--no-shadow');
  }
  async isNoContentPadding() {
    return await elementAttributeContains(this.currentPath, 'class', 'eui-card--no-content-padding');
  }
  async isHoverable() {
    return await elementAttributeContains(this.currentPath, 'class', 'eui-card--hoverable');
  }
}


