<?xml version="1.0"?>
<!--
/**
 * @author 1902 Software
 * @copyright Copyright © 2023 1902 Software (https://1902software.com/magento/)
 * @package WriteTextAI_WriteTextAI
 */
-->

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="admin-1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <referenceContainer name="content">
            <block name="wtai.edit.container" template="WriteTextAI_WriteTextAI::edit/container.phtml">
                <block name="wtai.review.notice.edit" class="WriteTextAI\WriteTextAI\Block\Adminhtml\ReviewNotice"
                template="WriteTextAI_WriteTextAI::review_notice.phtml" before="wtai.store.container" />
                <container name="wtai.store.container" as="wtai_store_container" htmlTag="div" htmlClass="wtai-store-container page-main-actions" before="-">
                    <block name="wtai.store" template="WriteTextAI_WriteTextAI::edit/store.phtml" />
                </container>
                <container name="wtai.page.main.actions" as="wtai_page_main_actions" htmlTag="div" htmlClass="wtai-product-actions page-main-actions">
                    <block name="wtai.edit.product_name" template="WriteTextAI_WriteTextAI::edit/name.phtml" />
                    <block name="wtai.main.buttons" template="WriteTextAI_WriteTextAI::edit/button.phtml">
                        <arguments>
                            <argument name="transfer_settings" xsi:type="object">WriteTextAI\WriteTextAI\ViewModel\TransferSettings</argument>
                            <argument name="tooltip" xsi:type="object">WriteTextAI\WriteTextAI\ViewModel\Tooltip</argument>
                            <argument name="permissions" xsi:type="object">WriteTextAI\WriteTextAI\ViewModel\Permissions</argument>
                            <argument name="premium" xsi:type="object">WriteTextAI\WriteTextAI\ViewModel\Premium</argument>
                            <argument name="fields" xsi:type="object">WriteTextAI\WriteTextAI\ViewModel\Fields</argument>
                        </arguments>
                        <block name="wtai.mark.reviewed" template="WriteTextAI_WriteTextAI::edit/mark_reviewed.phtml">
                            <arguments>
                                <argument name="tooltip" xsi:type="object">WriteTextAI\WriteTextAI\ViewModel\Tooltip</argument>
                                <argument name="permissions" xsi:type="object">WriteTextAI\WriteTextAI\ViewModel\Permissions</argument>
                                <argument name="fields" xsi:type="object">WriteTextAI\WriteTextAI\ViewModel\Fields</argument>
                            </arguments>
                        </block>
                        <block name="wtai.preview.changes" template="WriteTextAI_WriteTextAI::edit/preview_changes.phtml">
                            <arguments>
                                <argument name="tooltip" xsi:type="object">WriteTextAI\WriteTextAI\ViewModel\Tooltip</argument>
                            </arguments>
                        </block>
                    </block>
                </container>
                <block name="wtai.error.messages" template="WriteTextAI_WriteTextAI::edit/messages.phtml" />
                <block name="wtai.invalid.image.popup" template="WriteTextAI_WriteTextAI::edit/invalid_image_popup.phtml" />
                <block name="wtai.keyword.progress" template="WriteTextAI_WriteTextAI::edit/keywords/progress.phtml">
                    <arguments>
                        <argument name="entity_type" xsi:type="string">Product</argument>
                    </arguments>
                </block>
                <container name="wtai.edit.content">
                    <block name="wtai.accordion" template="WriteTextAI_WriteTextAI::edit/accordion.phtml">
                        <arguments>
                            <argument name="premium" xsi:type="object">WriteTextAI\WriteTextAI\ViewModel\Premium</argument>
                            <argument name="settings" xsi:type="object">WriteTextAI\WriteTextAI\ViewModel\Settings</argument>
                        </arguments>
                        <block name="wtai.keywords" template="WriteTextAI_WriteTextAI::edit/keywords/keywords.phtml">
                            <arguments>
                                <argument name="js_component" xsi:type="string">WriteTextAI_WriteTextAI/js/edit/keywords/keywords</argument>
                                <argument name="title" xsi:type="string" translate="true">Target keywords</argument>
                                <argument name="tooltip" xsi:type="object">WriteTextAI\WriteTextAI\ViewModel\Tooltip</argument>
                                <!-- @note: since this block is shared between product and category edit pages, we need to pass the tooltip_category view model -->
                                <argument name="tooltip_category" xsi:type="object">WriteTextAI\WriteTextAI\ViewModel\TooltipCategory</argument>
                                <argument name="permissions" xsi:type="object">WriteTextAI\WriteTextAI\ViewModel\Permissions</argument>
                                <argument name="step" xsi:type="string">Step 1</argument>
                                <argument name="premium_model" xsi:type="object">WriteTextAI\WriteTextAI\ViewModel\Premium</argument>
                                <argument name="pro" xsi:type="boolean">false</argument>
                                <argument name="settings" xsi:type="object">WriteTextAI\WriteTextAI\ViewModel\Settings</argument>
                                <argument name="entity_type" xsi:type="string">Product</argument>
                            </arguments>
                            <block name="wtai.pro.badge.wtai.keywords" template="WriteTextAI_WriteTextAI::pro_badge.phtml" />
                            <block name="wtai.keyword.invalid.image.popup" template="WriteTextAI_WriteTextAI::edit/keywords/invalid_image_popup.phtml" />
                            <block name="wtai.keyword.analysis" template="WriteTextAI_WriteTextAI::edit/keywords/keyword_analysis.phtml">
                                <arguments>
                                    <argument name="js_component" xsi:type="string">WriteTextAI_WriteTextAI/js/edit/keywords/keyword-analysis</argument>
                                    <argument name="tooltip" xsi:type="object">WriteTextAI\WriteTextAI\ViewModel\Tooltip</argument>
                                    <argument name="permissions" xsi:type="object">WriteTextAI\WriteTextAI\ViewModel\Permissions</argument>
                                    <argument name="settings" xsi:type="object">WriteTextAI\WriteTextAI\ViewModel\Settings</argument>
                                    <argument name="timezone" xsi:type="object">WriteTextAI\WriteTextAI\ViewModel\Timezone</argument>
                                    <argument name="entity_type" xsi:type="string">Product</argument>
                                </arguments>
                                <block name="wtai.keyword.ranking.history" template="WriteTextAI_WriteTextAI::edit/keywords/ranking_history.phtml"> 
                                    <arguments>
                                        <argument name="js_component" xsi:type="string">WriteTextAI_WriteTextAI/js/edit/keywords/ranking-history</argument>
                                        <argument name="entity_type" xsi:type="string">Product</argument>
                                        <argument name="timezone" xsi:type="object">WriteTextAI\WriteTextAI\ViewModel\Timezone</argument>
                                    </arguments>
                                </block>
                                <block name="wtai.keywords.error.messages" template="WriteTextAI_WriteTextAI::edit/keywords/messages.phtml" />
                                <block name="wtai.keyword.pipelines" template="WriteTextAI_WriteTextAI::edit/keywords/keyword_pipelines.phtml"> 
                                    <arguments>
                                        <argument name="js_component" xsi:type="string">WriteTextAI_WriteTextAI/js/edit/keywords/keyword-pipelines</argument>
                                        <argument name="pipeline_settings" xsi:type="object">WriteTextAI\WriteTextAI\ViewModel\PipelineSettings</argument>
                                        <argument name="timezone" xsi:type="object">WriteTextAI\WriteTextAI\ViewModel\Timezone</argument>
                                        <argument name="entity_type" xsi:type="string">Product</argument>
                                    </arguments>
                                    <block name="wtai.pipeline" template="WriteTextAI_WriteTextAI::edit/keywords/pipeline.phtml">
                                        <block name="wtai.pipeline.keyword.high" template="WriteTextAI_WriteTextAI::edit/keywords/pipeline_keyword.phtml">
                                            <arguments>
                                                <argument name="difficulty" xsi:type="string">High</argument>
                                                <argument name="difficulty_label" xsi:type="string" translate="true">HIGH</argument>
                                            </arguments>
                                            <block name="wtai.serp.popup.high" template="WriteTextAI_WriteTextAI::edit/keywords/serp_popup.phtml" />
                                            <block name="wtai.trigger.settings.high" template="WriteTextAI_WriteTextAI::edit/keywords/trigger_settings.phtml" />
                                        </block>
                                        <block name="wtai.pipeline.keyword.midhigh" template="WriteTextAI_WriteTextAI::edit/keywords/pipeline_keyword.phtml">
                                            <arguments>
                                                <argument name="difficulty" xsi:type="string">MidHigh</argument>
                                                <argument name="difficulty_label" xsi:type="string" translate="true">MID HIGH</argument>
                                            </arguments>
                                            <block name="wtai.serp.popup.midhigh" template="WriteTextAI_WriteTextAI::edit/keywords/serp_popup.phtml" />
                                            <block name="wtai.trigger.settings.midhigh" template="WriteTextAI_WriteTextAI::edit/keywords/trigger_settings.phtml" />
                                        </block>
                                        <block name="wtai.pipeline.keyword.mid" template="WriteTextAI_WriteTextAI::edit/keywords/pipeline_keyword.phtml">
                                            <arguments>
                                                <argument name="difficulty" xsi:type="string">Mid</argument>
                                                <argument name="difficulty_label" xsi:type="string" translate="true">MID</argument>
                                            </arguments>
                                            <block name="wtai.serp.popup.mid" template="WriteTextAI_WriteTextAI::edit/keywords/serp_popup.phtml" />
                                            <block name="wtai.trigger.settings.mid" template="WriteTextAI_WriteTextAI::edit/keywords/trigger_settings.phtml" />
                                        </block>
                                        <block name="wtai.pipeline.keyword.lowmid" template="WriteTextAI_WriteTextAI::edit/keywords/pipeline_keyword.phtml">
                                            <arguments>
                                                <argument name="difficulty" xsi:type="string">LowMid</argument>
                                                <argument name="difficulty_label" xsi:type="string" translate="true">LOW MID</argument>
                                            </arguments>
                                            <block name="wtai.serp.popup.lowmid" template="WriteTextAI_WriteTextAI::edit/keywords/serp_popup.phtml" />
                                            <block name="wtai.trigger.settings.lowmid" template="WriteTextAI_WriteTextAI::edit/keywords/trigger_settings.phtml" />
                                        </block>
                                        <block name="wtai.pipeline.keyword.low" template="WriteTextAI_WriteTextAI::edit/keywords/pipeline_keyword.phtml">
                                            <arguments>
                                                <argument name="difficulty" xsi:type="string">Low</argument>
                                                <argument name="difficulty_label" xsi:type="string" translate="true">LOW</argument>
                                            </arguments>
                                            <block name="wtai.serp.popup.low" template="WriteTextAI_WriteTextAI::edit/keywords/serp_popup.phtml" />
                                            <block name="wtai.trigger.settings.low" template="WriteTextAI_WriteTextAI::edit/keywords/trigger_settings.phtml" />
                                        </block>
                                    </block>
                                    <block name="wtai.edit.pipeline" template="WriteTextAI_WriteTextAI::edit/keywords/edit_pipeline.phtml" />
                                    <block name="wtai.empty.pipeline" template="WriteTextAI_WriteTextAI::edit/keywords/empty_pipeline.phtml" />
                                    <block name="wtai.keyword.ranking" template="WriteTextAI_WriteTextAI::edit/keywords/keyword_ranking.phtml">
                                        <block name="wtai.edit.keyword.ranking" template="WriteTextAI_WriteTextAI::edit/keywords/edit_keyword_ranking.phtml" />
                                        <block name="wtai.serp.popup.ranking" template="WriteTextAI_WriteTextAI::edit/keywords/serp_popup_ranking.phtml" />
                                    </block>
                                </block>
                                <block name="wtai.keyword.pool" template="WriteTextAI_WriteTextAI::edit/keywords/keyword_pool.phtml"> 
                                    <arguments>
                                        <argument name="js_component" xsi:type="string">WriteTextAI_WriteTextAI/js/edit/keywords/keyword-pool</argument>
                                        <argument name="entity_type" xsi:type="string">Product</argument>
                                    </arguments>
                                </block>
                            </block>
                        </block>
                        <block name="wtai.attributes" template="WriteTextAI_WriteTextAI::edit/attributes.phtml">
                            <arguments>
                                <argument name="title" xsi:type="string" translate="true">Product data</argument>
                                <argument name="tooltip" xsi:type="object">WriteTextAI\WriteTextAI\ViewModel\Tooltip</argument>
                                <argument name="permissions" xsi:type="object">WriteTextAI\WriteTextAI\ViewModel\Permissions</argument>
                                <argument name="step" xsi:type="string">Step 2</argument>
                                <argument name="premium_model" xsi:type="object">WriteTextAI\WriteTextAI\ViewModel\Premium</argument>
                                <argument name="pro" xsi:type="boolean">false</argument>
                                <argument name="settings" xsi:type="object">WriteTextAI\WriteTextAI\ViewModel\Settings</argument>
                            </arguments>
                            <block name="wtai.pro.badge.attributes" template="WriteTextAI_WriteTextAI::pro_badge.phtml" />
                            <block name="wtai.additional.prompt" template="WriteTextAI_WriteTextAI::edit/additional_prompt.phtml">
                                <arguments>
                                    <argument name="title" xsi:type="string" translate="true">Additional prompt</argument>
                                    <argument name="tooltip" xsi:type="object">WriteTextAI\WriteTextAI\ViewModel\Tooltip</argument>
                                    <argument name="permissions" xsi:type="object">WriteTextAI\WriteTextAI\ViewModel\Permissions</argument>
                                    <argument name="premium_model" xsi:type="object">WriteTextAI\WriteTextAI\ViewModel\Premium</argument>
                                </arguments>
                            </block>
                        </block>
                    </block>
                    <block name="wtai.toolbar" template="WriteTextAI_WriteTextAI::edit/toolbar.phtml">
                        <arguments>
                            <argument name="tooltip" xsi:type="object">WriteTextAI\WriteTextAI\ViewModel\Tooltip</argument>
                            <argument name="fields" xsi:type="object">WriteTextAI\WriteTextAI\ViewModel\Fields</argument>
                            <argument name="permissions" xsi:type="object">WriteTextAI\WriteTextAI\ViewModel\Permissions</argument>
                            <argument name="generate_settings" xsi:type="object">WriteTextAI\WriteTextAI\ViewModel\GenerateSettings</argument>
                            <argument name="premium" xsi:type="object">WriteTextAI\WriteTextAI\ViewModel\Premium</argument>
                            <argument name="settings" xsi:type="object">WriteTextAI\WriteTextAI\ViewModel\Settings</argument>
                        </arguments>
                        <block name="wtai.pro.badge.toolbar" template="WriteTextAI_WriteTextAI::pro_badge.phtml" />
                    </block>
                    <block name="wtai.text.fields" template="WriteTextAI_WriteTextAI::edit/text.phtml">
                        <arguments>
                            <argument name="tooltip" xsi:type="object">WriteTextAI\WriteTextAI\ViewModel\Tooltip</argument>
                            <argument name="transfer_settings" xsi:type="object">WriteTextAI\WriteTextAI\ViewModel\TransferSettings</argument>
                            <argument name="wysiwyg" xsi:type="object">WriteTextAI\WriteTextAI\ViewModel\Wysiwyg</argument>
                            <argument name="fields" xsi:type="object">WriteTextAI\WriteTextAI\ViewModel\Fields</argument>
                            <argument name="permissions" xsi:type="object">WriteTextAI\WriteTextAI\ViewModel\Permissions</argument>
                            <argument name="max_page_title" xsi:type="helper" helper="WriteTextAI\WriteTextAI\Helper\Data::getMaxLengthSettings">
                                <param name="path">page_title</param>
                            </argument>
                            <argument name="max_page_desc" xsi:type="helper" helper="WriteTextAI\WriteTextAI\Helper\Data::getMaxLengthSettings">
                                <param name="path">page_description</param>
                            </argument>
                            <argument name="max_open_graph" xsi:type="helper" helper="WriteTextAI\WriteTextAI\Helper\Data::getMaxLengthSettings">
                                <param name="path">open_graph</param>
                            </argument>
                            <argument name="premium" xsi:type="object">WriteTextAI\WriteTextAI\ViewModel\Premium</argument>
                            <argument name="settings" xsi:type="object">WriteTextAI\WriteTextAI\ViewModel\Settings</argument>
                            <argument name="attr_scope" xsi:type="object">WriteTextAI\WriteTextAI\ViewModel\AttributeScope</argument>
                            <argument name="template_settings" xsi:type="object">WriteTextAI\WriteTextAI\ViewModel\TemplateSettings</argument>
                        </arguments>
                        <block name="wtai.feedback" template="WriteTextAI_WriteTextAI::edit/feedback.phtml">
                            <arguments>
                                <argument name="settings" xsi:type="object">WriteTextAI\WriteTextAI\ViewModel\Settings</argument>
                                <argument name="entity_type" xsi:type="string">Product</argument>
                            </arguments>
                        </block>
                        <block name="wtai.custom.text.warning" template="WriteTextAI_WriteTextAI::notification/custom_text_warning.phtml" />
                        <block name="wtai.select.template" template="WriteTextAI_WriteTextAI::edit/select_template.phtml">
                            <arguments>
                                <argument name="template_settings" xsi:type="object">WriteTextAI\WriteTextAI\ViewModel\TemplateSettings</argument>
                                <argument name="entity_type" xsi:type="string">Product</argument>
                            </arguments>
                        </block>
                    </block>
                    <block name="wtai.gallery" template="WriteTextAI_WriteTextAI::edit/gallery.phtml">
                        <arguments>
                            <argument name="tooltip" xsi:type="object">WriteTextAI\WriteTextAI\ViewModel\Tooltip</argument>
                            <argument name="premium" xsi:type="object">WriteTextAI\WriteTextAI\ViewModel\Premium</argument>
                            <argument name="permissions" xsi:type="object">WriteTextAI\WriteTextAI\ViewModel\Permissions</argument>
                            <argument name="transfer_settings" xsi:type="object">WriteTextAI\WriteTextAI\ViewModel\TransferSettings</argument>
                            <argument name="settings" xsi:type="object">WriteTextAI\WriteTextAI\ViewModel\Settings</argument>
                            <argument name="entity_type" xsi:type="string">ImageAltText</argument>
                        </arguments>
                        <block name="wtai.gallery.feedback" template="WriteTextAI_WriteTextAI::edit/gallery/feedback.phtml" />
                    </block>
                </container>
                <container name="wtai.edit.footer" htmlTag="footer" htmlClass="page-footer edit-footer" after="-">
                    <container name="wtai.edit.footer.left.container" htmlTag="div" htmlClass="additional-information" before="-">
                        <block name="wtai.edit.total.credits" template="WriteTextAI_WriteTextAI::footer/total_credits.phtml">
                            <arguments>
                                <argument name="premium" xsi:type="object">WriteTextAI\WriteTextAI\ViewModel\Premium</argument>
                                <argument name="footer" xsi:type="object">WriteTextAI\WriteTextAI\ViewModel\Footer</argument>
                            </arguments>
                        </block>
                        <block name="wtai.restore.global.settings" template="WriteTextAI_WriteTextAI::edit/restore_global_settings.phtml" />
                        <block name="wtai.steps" template="WriteTextAI_WriteTextAI::edit/steps.phtml" />
                    </container>
                    <container name="wtai.edit.copyright.container" htmlTag="p" htmlClass="copyright" after="-">
                        <block name="wtai.edit.copyright" class="WriteTextAI\WriteTextAI\Block\Adminhtml\Footer" template="WriteTextAI_WriteTextAI::footer/copyright.phtml" />
                    </container>
                </container>
            </block>
        </referenceContainer>
    </body>
</page>
