{"version":3,"file":"EditableImageDisclosure.CN0OabML.mjs","names":["DisclosureReact.useState","DisclosureReact.useRef","DisclosureReact.useId"],"sources":["https:/framerusercontent.com/modules/nNPBF66ypkQgZGfW4QZb/0Ce9OIYPvaADqOR7RxQ3/EditableImageDisclosure.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{addPropertyControls,ControlType}from\"framer\";import*as DisclosureReact from\"react\";/**\n * @framerSupportedLayoutWidth fixed\n * @framerSupportedLayoutHeight fixed\n * @framerIntrinsicWidth 44\n * @framerIntrinsicHeight 44\n */export default function RoodieAiDisclosure({text=\"Diese Darstellungen wurden mit Hilfe k\\xfcnstlicher Intelligenz gestaltet.\",photo=false,style}){const[open,setOpen]=DisclosureReact.useState(false);const root=DisclosureReact.useRef(null);const tipId=DisclosureReact.useId();const[tipWidth,setTipWidth]=DisclosureReact.useState(270);DisclosureReact.useEffect(()=>{let container=root.current?.parentElement;while(container&&container.clientWidth<100)container=container.parentElement;if(!container)return;const update=()=>setTipWidth(Math.min(270,Math.max(120,container.clientWidth-24),window.innerWidth-48));update();const observer=new ResizeObserver(update);observer.observe(container);return()=>observer.disconnect();},[]);DisclosureReact.useEffect(()=>{if(!open)return;const outside=event=>{if(!root.current?.contains(event.target))setOpen(false);};const escape=event=>{if(event.key===\"Escape\")setOpen(false);};document.addEventListener(\"pointerdown\",outside);document.addEventListener(\"keydown\",escape);return()=>{document.removeEventListener(\"pointerdown\",outside);document.removeEventListener(\"keydown\",escape);};},[open]);return /*#__PURE__*/_jsxs(\"div\",{ref:root,className:\"roodie-ai-disclosure\",\"data-open\":open,\"data-photo\":photo,style:{...style,position:\"relative\",width:44,height:44,overflow:\"visible\"},onPointerEnter:event=>{if(event.pointerType===\"mouse\")setOpen(true);},onPointerLeave:event=>{if(event.pointerType===\"mouse\")setOpen(false);},onBlur:event=>{if(!event.currentTarget.contains(event.relatedTarget))setOpen(false);},children:[/*#__PURE__*/_jsx(\"style\",{children:`\n            .roodie-ai-disclosure button { display:flex;align-items:center;justify-content:center;width:44px;height:44px;padding:0;border:0;border-radius:50%;background:transparent;color:rgba(255,255,255,.52);cursor:help;transition:color .18s,background .18s; }\n            .roodie-ai-disclosure[data-photo=true] button { background:rgba(15,15,22,.24);color:rgba(255,255,255,.78);backdrop-filter:blur(6px); }\n            .roodie-ai-disclosure button:hover,.roodie-ai-disclosure[data-open=true] button { color:rgba(255,255,255,.94);background:rgba(255,255,255,.06); }\n            .roodie-ai-disclosure button:focus-visible { outline:2px solid #d7d4ee;outline-offset:-5px; }\n            .roodie-ai-disclosure__tip { position:absolute;right:0;bottom:100%;padding-bottom:8px;width:min(270px,calc(100vw - 48px));visibility:hidden;opacity:0;transform:translateY(4px);transition:opacity .18s,transform .18s,visibility .18s;pointer-events:none; }\n            .roodie-ai-disclosure[data-open=true] .roodie-ai-disclosure__tip { visibility:visible;opacity:1;transform:translateY(0);pointer-events:auto; }\n            .roodie-ai-disclosure__copy { padding:13px 15px;border:1px solid rgba(255,255,255,.15);border-radius:13px;background:rgba(29,28,35,.96);box-shadow:0 8px 28px rgba(0,0,0,.2);color:#f5f3fc;font:400 12px/1.55 Satoshi,sans-serif;text-align:left; }\n            @media(prefers-reduced-motion:reduce) { .roodie-ai-disclosure button,.roodie-ai-disclosure__tip { transition:none; } }\n        `}),/*#__PURE__*/_jsx(\"button\",{type:\"button\",\"aria-label\":\"Hinweis zu KI-generierten Darstellungen\",\"aria-describedby\":open?tipId:undefined,onFocus:event=>{if(event.currentTarget.matches(\":focus-visible\"))setOpen(true);},onClick:event=>{if(event.detail===0)setOpen(true);else setOpen(value=>!value);},children:/*#__PURE__*/_jsxs(\"svg\",{\"aria-hidden\":\"true\",width:\"18\",height:\"18\",viewBox:\"0 0 24 24\",fill:\"none\",stroke:\"currentColor\",strokeWidth:\"1.35\",strokeLinejoin:\"round\",children:[/*#__PURE__*/_jsx(\"path\",{d:\"M12 3c1.35 5.15 3.85 7.65 9 9-5.15 1.35-7.65 3.85-9 9-1.35-5.15-3.85-7.65-9-9 5.15-1.35 7.65-3.85 9-9Z\"}),/*#__PURE__*/_jsx(\"path\",{d:\"m20 2 .55 1.45L22 4l-1.45.55L20 6l-.55-1.45L18 4l1.45-.55L20 2Z\",strokeWidth:\"1\"})]})}),/*#__PURE__*/_jsx(\"div\",{id:tipId,role:\"tooltip\",className:\"roodie-ai-disclosure__tip\",style:{width:tipWidth},\"aria-hidden\":!open,children:/*#__PURE__*/_jsx(\"div\",{className:\"roodie-ai-disclosure__copy\",children:text})})]});}addPropertyControls(RoodieAiDisclosure,{photo:{type:ControlType.Boolean,title:\"Fotohintergrund\",defaultValue:false}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"RoodieAiDisclosure\",\"slots\":[],\"annotations\":{\"framerIntrinsicHeight\":\"44\",\"framerContractVersion\":\"1\",\"framerSupportedLayoutHeight\":\"fixed\",\"framerSupportedLayoutWidth\":\"fixed\",\"framerIntrinsicWidth\":\"44\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./EditableImageDisclosure.map"],"mappings":"+MAKG,SAAwB,EAAmB,CAAC,OAAK,0EAA6E,QAAM,GAAM,SAAO,CAAC,GAAK,CAAC,EAAK,GAASA,EAAyB,EAAK,EAAQ,EAAKC,EAAuB,IAAI,EAAQ,EAAMC,EAAsB,EAAO,CAAC,EAAS,GAAaF,EAAyB,GAAG,EAA8xB,OAA5xB,MAA8B,CAAC,IAAI,EAAU,EAAK,SAAS,cAAc,KAAM,GAAW,EAAU,YAAY,KAAI,EAAU,EAAU,cAAc,GAAG,CAAC,EAAU,OAAO,IAAM,MAAW,EAAY,KAAK,IAAI,IAAI,KAAK,IAAI,IAAI,EAAU,YAAY,EAAE,EAAE,EAAO,WAAW,EAAE,CAAC,EAAE,EAAO,EAAE,IAAM,EAAS,IAAI,eAAe,CAAM,EAA8B,OAA5B,EAAS,QAAQ,CAAS,MAAY,EAAS,WAAW,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