| 1 |
/** |
| 2 |
* AI Tools Page Component |
| 3 |
* |
| 4 |
* Tabbed interface for AI-powered content tools |
| 5 |
* |
| 6 |
* @package ThinkRank |
| 7 |
* @since 1.0.0 |
| 8 |
*/ |
| 9 |
|
| 10 |
import { useState } from '@wordpress/element'; |
| 11 |
import { __ } from '@wordpress/i18n'; |
| 12 |
import { TabPanel } from '@wordpress/components'; |
| 13 |
|
| 14 |
// Import tab components |
| 15 |
import ContentPlannerTab from '../ai-tools/ContentPlannerTab'; |
| 16 |
import MetadataGeneratorTab from '../ai-tools/MetadataGeneratorTab'; |
| 17 |
|
| 18 |
/** |
| 19 |
* AI Tools Component |
| 20 |
*/ |
| 21 |
const AITools = () => { |
| 22 |
const tabs = [ |
| 23 |
{ |
| 24 |
name: 'content-planner', |
| 25 |
title: __('Content Planner', 'thinkrank'), |
| 26 |
className: 'tab-content-planner', |
| 27 |
}, |
| 28 |
{ |
| 29 |
name: 'metadata-generator', |
| 30 |
title: __('Metadata Generator', 'thinkrank'), |
| 31 |
className: 'tab-metadata-generator', |
| 32 |
}, |
| 33 |
]; |
| 34 |
|
| 35 |
return ( |
| 36 |
<div className="thinkrank-ai-tools"> |
| 37 |
<TabPanel |
| 38 |
className="thinkrank-ai-tools-tabs" |
| 39 |
activeClass="is-active" |
| 40 |
tabs={tabs} |
| 41 |
initialTabName="content-planner" |
| 42 |
> |
| 43 |
{(tab) => ( |
| 44 |
<div className="thinkrank-min-h-96"> |
| 45 |
{tab.name === 'content-planner' && <ContentPlannerTab />} |
| 46 |
{tab.name === 'metadata-generator' && <MetadataGeneratorTab />} |
| 47 |
</div> |
| 48 |
)} |
| 49 |
</TabPanel> |
| 50 |
</div> |
| 51 |
); |
| 52 |
}; |
| 53 |
|
| 54 |
export default AITools; |
| 55 |
|