import React, {Component, PropTypes} from 'react' import {connect} from 'react-redux' import {bindActionCreators} from 'redux' import * as ModalActions from '../redux/modules/modals' import * as RequestGroupActions from '../redux/modules/requestGroups' import * as RequestActions from '../redux/modules/requests' import PromptModal from '../components/base/PromptModal' import * as db from '../database' import {MODAL_REQUEST_RENAME, MODAL_REQUEST_GROUP_RENAME} from '../lib/constants'; class Prompts extends Component { constructor (props) { super(props); this._prompts = {}; this._prompts[MODAL_REQUEST_RENAME] = { header: 'Rename Request', submit: 'Rename', onSubmit: (modal, name) => { db.update(modal.data.request, {name}) } }; this._prompts[MODAL_REQUEST_GROUP_RENAME] = { header: 'Rename Request Group', submit: 'Rename', onSubmit: (modal, name) => { db.update(modal.data.requestGroup, {name}) } }; } render () { const {modals, actions} = this.props; return (