'use client'

import { useContext } from 'react'

import { CreateComponentContext } from '@/contexts'

export function useCreateComponent() {
	const context = useContext(CreateComponentContext)
	//
	if (!context) {
		throw new Error('useCreateComponent')
	}
	//
	return context
}
