{"version":3,"names":["createContext","useContext","NOOP_FIELD_ITEM_CONTEXT","disabled","present","FieldItemContext","useFieldItemContext"],"sources":["field-item-context.ts"],"sourcesContent":["import { type Accessor, createContext, useContext } from \"solid-js\";\n\n/**\n * Context value handed down by `<Field.Item>` so nested controls can inherit\n * the item-level `disabled` override without walking back to the root.\n *\n * Mirrors Base UI React's `FieldItemContext` — a narrow per-item scope used\n * when a single `<Field.Root>` contains multiple logical sub-controls (e.g.\n * a `<CheckboxGroup>` with per-checkbox labels + descriptions).\n */\nexport interface FieldItemContextValue {\n\tdisabled: Accessor<boolean>;\n\treadonly present: boolean;\n}\n\nexport const NOOP_FIELD_ITEM_CONTEXT: FieldItemContextValue = {\n\tdisabled: () => false,\n\tpresent: false,\n};\n\nexport const FieldItemContext = createContext<FieldItemContextValue>(\n\tNOOP_FIELD_ITEM_CONTEXT,\n);\n\n/**\n * Read the nearest `<Field.Item>` context. Returns the noop context when no\n * item is above — callers can branch on `.present` if they need to detect\n * the \"not in an item\" case.\n */\nexport function useFieldItemContext(): FieldItemContextValue {\n\treturn useContext(FieldItemContext);\n}\n"],"mappings":"AAAA,SAAwBA,aAAa,EAAEC,UAAU,QAAQ,UAAU;;AAEnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAMA,OAAO,MAAMC,uBAA8C,GAAG;EAC7DC,QAAQ,EAAEA,CAAA,KAAM,KAAK;EACrBC,OAAO,EAAE;AACV,CAAC;AAED,OAAO,MAAMC,gBAAgB,GAAGL,aAAa,CAC5CE,uBACD,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA,OAAO,SAASI,mBAAmBA,CAAA,EAA0B;EAC5D,OAAOL,UAAU,CAACI,gBAAgB,CAAC;AACpC","ignoreList":[]}