import Component from '../../component.js'
import { elementAttributeContains } from '../../../core/utils.js'
import ButtonComponent from '../../button.js'

export default class CoUxLanguageSelectorRow extends Component {
  constructor(parent) {
    let selector = 'div[contains(@class,"col-md-6")]';
    super(parent, selector);
    //https://citnet.tech.ec.europa.eu/CITnet/stash/projects/CSDR/repos/eui/browse/packages/components/src/lib/ux-components/ux-language-selector/ux-language-selector.component.html
  }
  get buttonBlock() {
    return new ButtonComponent(this.currentPath).byAttributeContains('class','ux-button--block');
  }
  async isLanguageCodeEqualSelectedLanguageCode() {
    return await elementAttributeContains(this.buttonBlock , 'class', 'class.ux-button--primary');
  }
  get label() {
    let path = '//label';
    return this.buttonBlock + path;
  }

}

  
