( function ( blocks, element, i18n ) {
	'use strict';

	var __ = i18n.__;

	blocks.registerBlockType( 'archivist-ai/chat', {
		title: __( 'Archivist AI Chat', 'archivist-ai' ),
		description: __( 'An inline AI chat that answers questions from your article archive.', 'archivist-ai' ),
		icon: 'format-chat',
		category: 'widgets',
		supports: { html: false, multiple: false },

		edit: function () {
			return element.createElement(
				'div',
				{
					style: {
						border: '1px dashed #999',
						borderRadius: '8px',
						padding: '32px 16px',
						textAlign: 'center',
						color: '#555',
						background: '#fafafa'
					}
				},
				'💬 ' + __( 'Archivist AI chat appears here on the published page.', 'archivist-ai' )
			);
		},

		save: function () {
			return null;
		}
	} );
} )( window.wp.blocks, window.wp.element, window.wp.i18n );
