<?xml version="1.0" encoding="utf-8"?>
<odoo>

    <!-- OWL Dashboard Client Action (new xmlid - old act_window used action_seo_content_dashboard) -->
    <record id="action_seo_content_dashboard_owl" model="ir.actions.client">
        <field name="name">SEO Content Dashboard</field>
        <field name="tag">seo_content_dashboard</field>
    </record>

    <!-- Keep act_window for pivot/graph reports -->
    <record id="action_seo_content_reports" model="ir.actions.act_window">
        <field name="name">SEO Content Reports</field>
        <field name="res_model">otk.seo.content</field>
        <field name="view_mode">pivot,graph,list</field>
        <field name="context">{'search_default_filter_my_content': 1}</field>
    </record>
    <!-- Graph View - Content by Type -->
    <record id="otk_seo_content_view_graph_type" model="ir.ui.view">
        <field name="name">otk.seo.content.graph.type</field>
        <field name="model">otk.seo.content</field>
        <field name="arch" type="xml">
            <graph string="Content by Type" type="pie">
                <field name="content_type"/>
            </graph>
        </field>
    </record>

    <!-- Graph View - Content by State -->
    <record id="otk_seo_content_view_graph_state" model="ir.ui.view">
        <field name="name">otk.seo.content.graph.state</field>
        <field name="model">otk.seo.content</field>
        <field name="arch" type="xml">
            <graph string="Content by Status" type="bar">
                <field name="state"/>
            </graph>
        </field>
    </record>

    <!-- Graph View - Token Usage Over Time -->
    <record id="otk_seo_content_view_graph_tokens" model="ir.ui.view">
        <field name="name">otk.seo.content.graph.tokens</field>
        <field name="model">otk.seo.content</field>
        <field name="arch" type="xml">
            <graph string="Token Usage Over Time" type="line">
                <field name="create_date" interval="month"/>
                <field name="token_cost" type="measure"/>
            </graph>
        </field>
    </record>

    <!-- Graph View - SEO Score Distribution -->
    <record id="otk_seo_content_view_graph_seo" model="ir.ui.view">
        <field name="name">otk.seo.content.graph.seo</field>
        <field name="model">otk.seo.content</field>
        <field name="arch" type="xml">
            <graph string="SEO Score Distribution" type="bar">
                <field name="seo_score"/>
            </graph>
        </field>
    </record>

    <!-- Pivot View -->
    <record id="otk_seo_content_view_pivot" model="ir.ui.view">
        <field name="name">otk.seo.content.pivot</field>
        <field name="model">otk.seo.content</field>
        <field name="arch" type="xml">
            <pivot string="Content Analysis">
                <field name="content_type" type="row"/>
                <field name="state" type="col"/>
                <field name="token_cost" type="measure"/>
                <field name="word_count" type="measure"/>
                <field name="seo_score" type="measure"/>
            </pivot>
        </field>
    </record>

    <!-- Graph Action - Token Usage -->
    <record id="action_seo_content_token_usage" model="ir.actions.act_window">
        <field name="name">Token Usage</field>
        <field name="res_model">otk.seo.content</field>
        <field name="view_mode">pivot,graph,list</field>
        <field name="view_id" ref="otk_seo_content_view_graph_tokens"/>
    </record>

    <!-- Graph Action - Content by Type -->
    <record id="action_seo_content_by_type" model="ir.actions.act_window">
        <field name="name">Content by Type</field>
        <field name="res_model">otk.seo.content</field>
        <field name="view_mode">pivot,graph,list</field>
        <field name="view_id" ref="otk_seo_content_view_graph_type"/>
    </record>

    <!-- Graph Action - Content by State -->
    <record id="action_seo_content_by_state" model="ir.actions.act_window">
        <field name="name">Content by Status</field>
        <field name="res_model">otk.seo.content</field>
        <field name="view_mode">pivot,graph,list</field>
        <field name="view_id" ref="otk_seo_content_view_graph_state"/>
    </record>

</odoo>
