using FastReport.Import.JasperReports;

namespace FastReport.Design.ImportPlugins.JasperReports
{
    /// <summary>
    /// Represents the JasperReports import plugin.
    /// </summary>
    public partial class JasperReportsImportPlugin : ImportPlugin
    {
        #region Constructors

        /// <summary>
        /// Initializes a new instance of the <see cref="JasperReportsImportPlugin"/> class.
        /// </summary>
        public JasperReportsImportPlugin() : base()
        {
            Import = new JasperReportsImport();
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="JasperReportsImportPlugin"/> class with a specified designer.
        /// </summary>
        /// <param name="designer">The report designer.</param>
        public JasperReportsImportPlugin(Designer designer) : base(designer)
        {
            Import = new JasperReportsImport();
        }

        #endregion // Constructors

        #region Protected Methods

        /// <inheritdoc/>
        protected override string GetFilter()
        {
            return new Utils.MyRes("FileFilters").Get("JasperReportsFile");
        }

        #endregion // Protected Methods

        #region Public Methods

        /// <inheritdoc/>
        public override void LoadReport(Report report, string filename)
        {
            Import.LoadReport(report, filename);
        }

        #endregion // Public Methods
    }
}
