import * as inquirer from "inquirer" ; import { SelectorBemObject } from "./interface" ; export async function getBemNamesFromUser ( selector , fileName ) { let { block } = await inquirer . prompt ( { message : `.${ selector }${ fileName ? ` in ${ fileName } ` : "" } does not follow BEM conventions. Enter the block name for this class (required): ` , name : "block" , validate : ( input ) => { return input !== "" ; } , } ) ; let { element } = await inquirer . prompt ( { message : `Enter the element name for .${ selector } (optional): ` , name : "element" , } ) ; let { modifier } = await inquirer . prompt ( { message : `Enter the modifier name for .${ selector } (optional): ` , name : "modifier" , } ) ; return { selector : selector , bemObj : { block , element , modifier } } ; }