import { useBlockProps, RichText } from "@wordpress/block-editor";

export default function save({ attributes }) {
	let { sectionTitle, sectionSubtitle, textAlign } = attributes;

	return (
		<div
			{...useBlockProps.save({
				className: `section_titling section_titling--${textAlign}`,
			})}
		>
			<RichText.Content
				value={sectionTitle}
				tagName="h3"
				className="section_titling__title"
			/>
			<RichText.Content
				value={sectionSubtitle}
				tagName="p"
				className="section_titling__subtitle"
			/>
		</div>
	);
}
