import { createContext, Dispatch, SetStateAction } from 'react'

import { IFileInfo } from '@/types'

export type CreateComponentContextProps = {
	name: string
	setName: Dispatch<SetStateAction<string>>
	//
	fileInfo: IFileInfo | null
	setFileInfo: Dispatch<SetStateAction<IFileInfo | null>>
	//
	componentPath: string
	setComponentPath: Dispatch<SetStateAction<string>>
}

export const CreateComponentContext =
	createContext<CreateComponentContextProps | null>(null)
