import { registerBlockType } from "@wordpress/blocks";
import { __ } from "@wordpress/i18n";

// Import components
import ButtonBasicEdit from "./edit";
import ButtonBasicSave from "./save";
import deprecated from "./deprecated";
import metadata from "./block.json";

// Import styles
import "./style.scss";
import "./editor.scss";

// Register the block
registerBlockType(metadata.name, {
  ...metadata,
  title: __(metadata.title, "zenblocks"),
  description: __("Advanced button block", "zenblocks"),
  edit: ButtonBasicEdit,
  save: ButtonBasicSave,
  deprecated,
});

// Export components for external use
export { default as ButtonBasicEdit } from "./edit";
export { default as ButtonBasicSave } from "./save";
