import React from 'react';
import i18n from 'nfvo-utils/i18n/i18n.js';
import Modal from 'nfvo-components/modal/Modal.jsx';
import objectValues from 'lodash/values.js';
import LicenseModelCreation from './licenseModel/creation/LicenseModelCreation.js';
import SoftwareProductCreation from './softwareProduct/creation/SoftwareProductCreation.js';
import VersionControllerUtils from 'nfvo-components/panel/versionController/VersionControllerUtils.js';
import classnames from 'classnames';
import ExpandableInput from 'nfvo-components/input/ExpandableInput.jsx';
export const catalogItemTypes = Object.freeze({
LICENSE_MODEL: 'license-model',
SOFTWARE_PRODUCT: 'software-product'
});
const catalogItemTypeClasses = {
LICENSE_MODEL: 'license-model-type',
SOFTWARE_PRODUCT: 'software-product-type'
};
class OnboardingCatalogView extends React.Component {
constructor(props) {
super(props);
this.state = {searchValue: ''};
this.handleSearch = this.handleSearch.bind(this);
}
handleSearch(event){
this.setState({searchValue: event.target.value});
}
static propTypes = {
licenseModelList: React.PropTypes.array,
softwareProductList: React.PropTypes.array,
modalToShow: React.PropTypes.oneOf(objectValues(catalogItemTypes)),
onSelectLicenseModel: React.PropTypes.func.isRequired,
onSelectSoftwareProduct: React.PropTypes.func.isRequired,
onAddLicenseModelClick: React.PropTypes.func.isRequired,
onAddSoftwareProductClick: React.PropTypes.func.isRequired
};
getModalDetails() {
const {modalToShow} = this.props;
switch (modalToShow) {
case catalogItemTypes.LICENSE_MODEL:
return {
title: i18n('New License Model'),
element: