import * as i2 from '@acorex/components/button';
import { AXButtonModule } from '@acorex/components/button';
import * as i3 from '@acorex/components/form';
import { AXFormModule } from '@acorex/components/form';
import * as i1 from '@acorex/components/select-box';
import { AXSelectBoxModule } from '@acorex/components/select-box';
import * as i4 from '@acorex/components/text-box';
import { AXTextBoxModule } from '@acorex/components/text-box';
import * as i0 from '@angular/core';
import { Input, CUSTOM_ELEMENTS_SCHEMA, Component } from '@angular/core';

class AXMShareEmailDialogComponent {
    constructor() {
        this.emails = '';
        this.permission = 'view';
        this.message = '';
        this.permissions = [
            { value: 'view', text: 'View only' },
            { value: 'edit', text: 'Can edit' },
            { value: 'full', text: 'Full access' },
        ];
    }
    handlePermissionChange(event) {
        this.permission = event;
    }
    onSend() {
        const emailList = this.emails
            .split('\n')
            .map((email) => email.trim())
            .filter((email) => email.length > 0);
        console.log({
            result: true,
            data: {
                emails: emailList,
                permission: this.permission,
                message: this.message,
            },
        });
    }
    onCancel() {
        console.log({ result: false });
    }
    static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMShareEmailDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
    static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.4", type: AXMShareEmailDialogComponent, isStandalone: true, selector: "ax-share-email-dialog", inputs: { node: "node" }, ngImport: i0, template: "<div class=\"ax-p-4 ax-gap-2\">\n  <ax-form>\n    <ax-form-field>\n      <ax-label>Email Addresses:</ax-label>\n      <ax-text-box\n        [(value)]=\"emails\"\n        [multiline]=\"true\"\n        placeholder=\"Enter email addresses (one per line)\"\n      ></ax-text-box>\n    </ax-form-field>\n    <ax-form-field>\n      <ax-label>Permission:</ax-label>\n      <ax-select-box\n        [(value)]=\"permission\"\n        [dataSource]=\"permissions\"\n        valueField=\"value\"\n        textField=\"text\"\n        (onValueChanged)=\"handlePermissionChange($event)\"\n      >\n      </ax-select-box>\n    </ax-form-field>\n    <ax-form-field>\n      <ax-label>Message (Optional):</ax-label>\n      <ax-text-box [(value)]=\"message\" [multiline]=\"true\"></ax-text-box>\n    </ax-form-field>\n  </ax-form>\n  <ax-footer>\n    <ax-suffix>\n      <ax-button text=\"Cancel\" (onClick)=\"onCancel()\"></ax-button>\n      <ax-button text=\"Send\" (onClick)=\"onSend()\"></ax-button>\n    </ax-suffix>\n  </ax-footer>\n</div>\n", dependencies: [{ kind: "ngmodule", type: AXSelectBoxModule }, { kind: "component", type: i1.AXSelectBoxComponent, selector: "ax-select-box", inputs: ["disabled", "readonly", "tabIndex", "placeholder", "minValue", "maxValue", "value", "state", "name", "id", "type", "look", "multiple", "valueField", "textField", "disabledField", "textTemplate", "selectedItems", "isItemTruncated", "showItemTooltip", "itemHeight", "maxVisibleItems", "dataSource", "minRecordsForSearch", "caption", "itemTemplate", "selectedTemplate", "emptyTemplate", "loadingTemplate", "dropdownWidth", "searchBoxAutoFocus"], outputs: ["valueChange", "stateChange", "onValueChanged", "onBlur", "onFocus", "readonlyChange", "disabledChange", "onOpened", "onClosed", "onItemSelected", "onItemClick"] }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i2.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "ngmodule", type: AXFormModule }, { kind: "component", type: i3.AXFormFieldComponent, selector: "ax-form-field", inputs: ["labelMode"] }, { kind: "component", type: i3.AXFormComponent, selector: "ax-form", inputs: ["labelMode", "look", "messageStyle", "updateOn"], outputs: ["onValidate", "updateOnChange"] }, { kind: "ngmodule", type: AXTextBoxModule }, { kind: "component", type: i4.AXTextBoxComponent, selector: "ax-text-box", inputs: ["disabled", "tabIndex", "readonly", "value", "state", "name", "id", "placeholder", "maxLength", "allowNull", "type", "autoComplete", "look", "mask-options", "class"], outputs: ["onBlur", "onFocus", "valueChange", "stateChange", "onValueChanged", "readonlyChange", "disabledChange", "onKeyDown", "onKeyUp", "onKeyPress"] }] }); }
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: AXMShareEmailDialogComponent, decorators: [{
            type: Component,
            args: [{ selector: 'ax-share-email-dialog', standalone: true, imports: [AXSelectBoxModule, AXButtonModule, AXFormModule, AXTextBoxModule], schemas: [CUSTOM_ELEMENTS_SCHEMA], template: "<div class=\"ax-p-4 ax-gap-2\">\n  <ax-form>\n    <ax-form-field>\n      <ax-label>Email Addresses:</ax-label>\n      <ax-text-box\n        [(value)]=\"emails\"\n        [multiline]=\"true\"\n        placeholder=\"Enter email addresses (one per line)\"\n      ></ax-text-box>\n    </ax-form-field>\n    <ax-form-field>\n      <ax-label>Permission:</ax-label>\n      <ax-select-box\n        [(value)]=\"permission\"\n        [dataSource]=\"permissions\"\n        valueField=\"value\"\n        textField=\"text\"\n        (onValueChanged)=\"handlePermissionChange($event)\"\n      >\n      </ax-select-box>\n    </ax-form-field>\n    <ax-form-field>\n      <ax-label>Message (Optional):</ax-label>\n      <ax-text-box [(value)]=\"message\" [multiline]=\"true\"></ax-text-box>\n    </ax-form-field>\n  </ax-form>\n  <ax-footer>\n    <ax-suffix>\n      <ax-button text=\"Cancel\" (onClick)=\"onCancel()\"></ax-button>\n      <ax-button text=\"Send\" (onClick)=\"onSend()\"></ax-button>\n    </ax-suffix>\n  </ax-footer>\n</div>\n" }]
        }], propDecorators: { node: [{
                type: Input
            }] } });

export { AXMShareEmailDialogComponent };
//# sourceMappingURL=acorex-modules-document-management-share-email-dialog.component-DbRYaPFI.mjs.map
