{"version":3,"file":"sort-children-of.action-BjuXTDgn.js","sources":["../../../src/packages/core/tree/entity-actions/sort-children-of/modal/sort-children-of-modal.token.ts","../../../src/packages/core/tree/entity-actions/sort-children-of/sort-children-of.action.ts"],"sourcesContent":["import { UMB_SORT_CHILDREN_OF_MODAL_ALIAS } from './constants.js';\nimport type { UmbEntityModel } from '@umbraco-cms/backoffice/entity';\nimport { UmbModalToken } from '@umbraco-cms/backoffice/modal';\n\nexport interface UmbSortChildrenOfModalData extends UmbEntityModel {\n\ttreeRepositoryAlias: string;\n\tsortChildrenOfRepositoryAlias: string;\n}\n\n// eslint-disable-next-line @typescript-eslint/no-empty-object-type\nexport interface UmbSortChildrenOfModalValue {}\n\nexport const UMB_SORT_CHILDREN_OF_MODAL = new UmbModalToken(\n\tUMB_SORT_CHILDREN_OF_MODAL_ALIAS,\n\t{\n\t\tmodal: {\n\t\t\ttype: 'sidebar',\n\t\t\tsize: 'small',\n\t\t},\n\t},\n);\n","import { UMB_SORT_CHILDREN_OF_MODAL } from './modal/index.js';\nimport { UmbEntityActionBase, UmbRequestReloadChildrenOfEntityEvent } from '@umbraco-cms/backoffice/entity-action';\nimport { UMB_MODAL_MANAGER_CONTEXT } from '@umbraco-cms/backoffice/modal';\nimport type { MetaEntityActionSortChildrenOfKind } from '@umbraco-cms/backoffice/extension-registry';\nimport { UMB_ACTION_EVENT_CONTEXT } from '@umbraco-cms/backoffice/action';\n\nexport class UmbSortChildrenOfEntityAction extends UmbEntityActionBase {\n\toverride async execute() {\n\t\tconst modalManager = await this.getContext(UMB_MODAL_MANAGER_CONTEXT);\n\t\tconst modal = modalManager.open(this._host, UMB_SORT_CHILDREN_OF_MODAL, {\n\t\t\tdata: {\n\t\t\t\tunique: this.args.unique,\n\t\t\t\tentityType: this.args.entityType,\n\t\t\t\tsortChildrenOfRepositoryAlias: this.args.meta.sortChildrenOfRepositoryAlias,\n\t\t\t\ttreeRepositoryAlias: this.args.meta.treeRepositoryAlias,\n\t\t\t},\n\t\t});\n\n\t\tawait modal.onSubmit();\n\n\t\tconst eventContext = await this.getContext(UMB_ACTION_EVENT_CONTEXT);\n\n\t\teventContext.dispatchEvent(\n\t\t\tnew UmbRequestReloadChildrenOfEntityEvent({\n\t\t\t\tunique: this.args.unique,\n\t\t\t\tentityType: this.args.entityType,\n\t\t\t}),\n\t\t);\n\t}\n}\n\nexport default UmbSortChildrenOfEntityAction;\n"],"names":["UMB_SORT_CHILDREN_OF_MODAL","UmbModalToken","UMB_SORT_CHILDREN_OF_MODAL_ALIAS","UmbSortChildrenOfEntityAction","UmbEntityActionBase","UMB_MODAL_MANAGER_CONTEXT","UMB_ACTION_EVENT_CONTEXT","UmbRequestReloadChildrenOfEntityEvent"],"mappings":";;;;AAYO,MAAMA,IAA6B,IAAIC;AAAA,EAC7CC;AAAA,EACA;AAAA,IACC,OAAO;AAAA,MACN,MAAM;AAAA,MACN,MAAM;AAAA,IACP;AAAA,EACD;AACD;ACdO,MAAMC,UAAsCC,EAAwD;AAAA,EAC1G,MAAe,UAAU;AAWxB,WAVqB,MAAM,KAAK,WAAWC,CAAyB,GACzC,KAAK,KAAK,OAAOL,GAA4B;AAAA,MACvE,MAAM;AAAA,QACL,QAAQ,KAAK,KAAK;AAAA,QAClB,YAAY,KAAK,KAAK;AAAA,QACtB,+BAA+B,KAAK,KAAK,KAAK;AAAA,QAC9C,qBAAqB,KAAK,KAAK,KAAK;AAAA,MACrC;AAAA,IAAA,CACA,EAEW,aAES,MAAM,KAAK,WAAWM,CAAwB,GAEtD;AAAA,MACZ,IAAIC,EAAsC;AAAA,QACzC,QAAQ,KAAK,KAAK;AAAA,QAClB,YAAY,KAAK,KAAK;AAAA,MAAA,CACtB;AAAA,IAAA;AAAA,EAEH;AACD;"}