<?php

use FileRun\Files\Plugin;

class custom_image_editor extends Plugin {

	public bool $weblinksCompatible = true;
	static $localeSection = ['Custom Actions: Image Editor', 'File Upload'];
	static $publicMethods = ['openInBrowser'];

	function init() {
		$this->JSconfig = [
			'title' => self::t('Image Editor'),
			'iconCls' => 'fa-crop-alt',
			'useWith' => ['img', 'img2', 'raw'],
			'popup' => true,
			'requiredUserPerms' => ['download', 'upload'],
			'requires' => ['download', 'alter']
		];
	}

	function run() {
		require $this->path."/display.php";
	}
}