/**
 * WordPress dependencies
 */
/**
 * External dependencies
 */
import clsx from 'clsx';
import type { AlternativeId } from '@nab/types';

/**
 * Internal dependencies
 */
import './style.scss';
import { Editor } from './editor';
import { Error } from './error';
import { SaveButton } from './save';
import { FooterActions } from './footer-actions';

export type SidebarProps = {
	readonly className?: string;
	readonly alternativeId: AlternativeId;
};

export const Sidebar = ( {
	className,
	alternativeId,
}: SidebarProps ): JSX.Element => (
	<div className={ clsx( [ 'nab-php-editor-sidebar', className ] ) }>
		<SaveButton />
		<Editor alternativeId={ alternativeId } />
		<Error alternativeId={ alternativeId } />
		<FooterActions />
	</div>
);
