| 1 |
import { Redirect } from '@agent/workflows/theme/components/Redirect'; |
| 2 |
import { SelectSiteVibes } from '@agent/workflows/theme/components/SelectSiteVibes'; |
| 3 |
import { __ } from '@wordpress/i18n'; |
| 4 |
import { brush } from '@wordpress/icons'; |
| 5 |
|
| 6 |
const { context, abilities } = window.extAgentData; |
| 7 |
|
| 8 |
export default { |
| 9 |
available: () => |
| 10 |
abilities?.canEditThemes && |
| 11 |
context?.hasThemeVariations && |
| 12 |
context?.isUsingVibes, |
| 13 |
needsRedirect: () => !Number(context?.postId || 0), |
| 14 |
redirectComponent: () => |
| 15 |
Redirect( |
| 16 |
// translators: "site style" refers to the structural aesthetic style for the site. |
| 17 |
__( |
| 18 |
'It looks like you are trying to change your site style, but you are not on a page where we can do that.', |
| 19 |
'extendify-local', |
| 20 |
), |
| 21 |
), |
| 22 |
id: 'change-site-vibes', |
| 23 |
whenFinished: { component: SelectSiteVibes }, |
| 24 |
example: { |
| 25 |
// translators: "site style" refers to the structural aesthetic style for the site. |
| 26 |
text: __('Change website style', 'extendify-local'), |
| 27 |
agentResponse: { |
| 28 |
// translators: This message show above a UI where the user can select a different site style variation for their theme. |
| 29 |
reply: __( |
| 30 |
'Below you can select a different site style variation for your theme.', |
| 31 |
'extendify-local', |
| 32 |
), |
| 33 |
whenFinishedTool: { |
| 34 |
id: 'update-site-vibes', |
| 35 |
labels: { |
| 36 |
confirm: __('Updated the website style', 'extendify-local'), |
| 37 |
cancel: __('Canceled the website style update', 'extendify-local'), |
| 38 |
}, |
| 39 |
}, |
| 40 |
}, |
| 41 |
}, |
| 42 |
icon: brush, |
| 43 |
}; |
| 44 |
|