import {
  ISlackTextObject,
  ISlackInput
} from '../../types';

function getElementWithSectionWrapper(
  element, label: ISlackTextObject, interactive?: boolean
): ISlackInput {
  
  const res: ISlackInput = {
    type: 'input',
    element,
    label
  };

  if (typeof interactive === 'boolean') {
    res.dispatch_action = interactive;
  }

  return res;
}

export { getElementWithSectionWrapper };
