{
  "version": 3,
  "sources": ["../../../src/specialized-bindings/const-binding.ts"],
  "sourcesContent": ["import { makeBinding } from '../binding/make-binding.mjs';\nimport type { ReadonlyBinding } from '../binding/types/readonly-binding';\nimport { useBinding } from '../binding/use-binding.mjs';\n\nexport interface ConstBindingArgs {\n  /** A technical, but human-readable ID, which isn't guaranteed to be unique */\n  id: string;\n}\n\n/** Makes a const binding without using any React contexts. */\nexport const makeConstBinding = <GetT>(value: GetT, { id }: ConstBindingArgs): ReadonlyBinding<GetT> => makeBinding(() => value, { id });\n\n/** Use for cases where a binding is required in an interface but the underlying value is constant with respect to a single render */\nexport const useConstBinding = <GetT>(value: GetT, { id }: ConstBindingArgs): ReadonlyBinding<GetT> => {\n  const internalBinding = useBinding(() => value, { id, detectChanges: true });\n  internalBinding.setRaw(value);\n\n  return internalBinding;\n};\n"],
  "mappings": "AAAA,SAAS,mBAAmB;AAE5B,SAAS,kBAAkB;AAQpB,MAAM,mBAAmB,CAAO,OAAa,EAAE,GAAG,MAA+C,YAAY,MAAM,OAAO,EAAE,GAAG,CAAC;AAGhI,MAAM,kBAAkB,CAAO,OAAa,EAAE,GAAG,MAA+C;AACrG,QAAM,kBAAkB,WAAW,MAAM,OAAO,EAAE,IAAI,eAAe,KAAK,CAAC;AAC3E,kBAAgB,OAAO,KAAK;AAE5B,SAAO;AACT;",
  "names": []
}
