import { useRef } from '@wordpress/element'; import { Button, Dropdown, VisuallyHidden, __experimentalText as Text, // eslint-disable-line TextControl, } from '@wordpress/components'; import { __ } from '@wordpress/i18n'; import { chevronDown } from '@wordpress/icons'; import { useSelect } from '@wordpress/data'; import { useEntityProp } from '@wordpress/core-data'; import { storeName } from '../../store'; // @see https://github.com/WordPress/gutenberg/blob/5e0ffdbc36cb2e967dfa6a6b812a10a2e56a598f/packages/edit-post/src/components/header/document-actions/index.js export function CampaignName() { const { showIconLabels } = useSelect( ( select ) => ( { showIconLabels: select( storeName ).isFeatureActive( 'showIconLabels' ), postId: select( storeName ).getEmailPostId(), } ), [] ); const [ emailTitle = '', setTitle ] = useEntityProp( 'postType', 'mailpoet_email', 'title' ); const titleRef = useRef( null ); return (