{"version":3,"file":"writable-property.condition-CI5VPRUr.js","sources":["../../../src/packages/core/property/conditions/writable-property.condition.ts"],"sourcesContent":["import { UMB_PROPERTY_CONTEXT } from '../property/property.context.js';\nimport type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api';\nimport type {\n\tUmbConditionConfigBase,\n\tUmbConditionControllerArguments,\n\tUmbExtensionCondition,\n} from '@umbraco-cms/backoffice/extension-api';\nimport { UmbConditionBase } from '@umbraco-cms/backoffice/extension-registry';\n\nexport class UmbWritablePropertyCondition\n\textends UmbConditionBase\n\timplements UmbExtensionCondition\n{\n\tconstructor(host: UmbControllerHost, args: UmbConditionControllerArguments) {\n\t\tsuper(host, args);\n\n\t\tthis.consumeContext(UMB_PROPERTY_CONTEXT, (context) => {\n\t\t\tthis.observe(context.isReadOnly, (value) => {\n\t\t\t\tthis.permitted = value !== true;\n\t\t\t});\n\t\t});\n\t}\n}\n\nexport { UmbWritablePropertyCondition as api };\n"],"names":["UmbWritablePropertyCondition","UmbConditionBase","host","args","UMB_PROPERTY_CONTEXT","context","value"],"mappings":";;AASO,MAAMA,UACJC,EAET;AAAA,EACC,YAAYC,GAAyBC,GAA+D;AACnG,UAAMD,GAAMC,CAAI,GAEX,KAAA,eAAeC,GAAsB,CAACC,MAAY;AACtD,WAAK,QAAQA,EAAQ,YAAY,CAACC,MAAU;AAC3C,aAAK,YAAYA,MAAU;AAAA,MAAA,CAC3B;AAAA,IAAA,CACD;AAAA,EACF;AACD;"}