Get the notebook metadata on jupyerlab frontend

Hi All,
i am trying to get the notebook metadata by using
import { NotebookPanel } from “@jupyterlab/notebook”;

notebook metadata in the console doesn’t give me any response,
can anyone help me where i am going wrong,
ToolBarButtons i s my react widget where i need to use the notebook metadata.