import { inject , injectable } from 'inversify' ; import * as apid from '../../../../../api' ; import IDropLogApiModel from '../../api/dropLog/IDropLogApiModel' ; import IDropLogDialogState from './IDropLogDialogState' ; @ injectable ( ) export default class DropLogDialogState implements IDropLogDialogState { private dropLogApiModel : IDropLogApiModel ; private name : string = '' ; private dropLogStr : string | null = null ; constructor ( @ inject ( 'IDropLogApiModel' ) dropLogApiModel ) { this . dropLogApiModel = dropLogApiModel ; } param name public setName ( name ) { this . name = name ; } param dropLogFileId return public async fetchData ( dropLogFileId ) { this . dropLogStr = null ; this . dropLogStr = await this . dropLogApiModel . get ( dropLogFileId ) ; } return public getName ( ) { return this . name ; } return public getDropLog ( ) { return this . dropLogStr ; } }