{"version":3,"file":"ProtectedDirectContact.Cf37MoRG.mjs","names":["useState","useId","startTransition"],"sources":["https:/framerusercontent.com/modules/Ui5mznsGqZv4IMNWcDoD/1gHjN0rJniK2ZKOPED4x/ProtectedDirectContact.js"],"sourcesContent":["import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{startTransition,useId,useState}from\"react\";import{addPropertyControls,ControlType}from\"framer\";/**\n * @framerSupportedLayoutWidth any-prefer-fixed\n * @framerSupportedLayoutHeight auto\n */export default function ProtectedDirectContact(props){const{backgroundColor=\"#FFFFFF\",borderColor=\"#EEEEEE\",textColor=\"#000000\",accentColor=\"#000000\",cornerRadius=12,gap=12,showEmail=true,showPhone=true,emailTriggerLabel=\"E-mail c\\xedm megjelen\\xedt\\xe9se\",phoneTriggerLabel=\"Telefonsz\\xe1m megjelen\\xedt\\xe9se\",emailPrefix=\"\",style}=props;const[emailRevealed,setEmailRevealed]=useState(false);const[phoneRevealed,setPhoneRevealed]=useState(false);// Egyedi ID-k akkor is, ha több példány kerül egyszerre a DOM-ba.\nconst instanceId=useId();const emailResultId=`${instanceId}-email-result`;const phoneResultId=`${instanceId}-phone-result`;// A teljes érték csak felfedés után áll össze.\nconst emailValue=emailRevealed?[\"aron\",\"koncert\",\"@\",\"gmail\",\".\",\"com\"].join(\"\"):\"\";const phoneDisplayValue=phoneRevealed?[\"+36\",\"20\",\"249\",\"55\",\"56\"].join(\" \"):\"\";const phoneHrefValue=phoneRevealed?[\"+36\",\"20\",\"249\",\"55\",\"56\"].join(\"\"):\"\";const rootStyle={position:\"relative\",width:\"100%\",boxSizing:\"border-box\",background:\"transparent\",border:\"none\",borderRadius:0,padding:0,\"--protected-contact-bg\":backgroundColor,\"--protected-contact-accent\":accentColor,\"--protected-contact-gap\":`${gap}px`,\"--protected-contact-text\":textColor,...style};const itemStyle={display:\"flex\",flexDirection:\"column\",gap:10,minWidth:0,borderTop:`1px solid ${borderColor}`,paddingTop:22};const revealControlStyle={width:\"auto\",position:\"relative\",boxSizing:\"border-box\",border:\"none\",borderRadius:cornerRadius,background:\"transparent\",color:accentColor,fontSize:15,fontWeight:500,lineHeight:1.4,padding:\"0\",textAlign:\"left\",cursor:\"pointer\",fontFamily:\"inherit\",textDecoration:\"underline\",textDecorationThickness:\"1px\",textUnderlineOffset:\"3px\",opacity:.96,minHeight:44,minWidth:44,display:\"inline-flex\",alignItems:\"center\",justifyContent:\"flex-start\"};const linkStyle={color:textColor,textDecoration:\"underline\",textDecorationThickness:\"1px\",textUnderlineOffset:\"3px\",fontWeight:600,overflowWrap:\"anywhere\",wordBreak:\"break-word\",minWidth:0,lineHeight:1.4,minHeight:44,display:\"inline-flex\",alignItems:\"center\"};return /*#__PURE__*/_jsxs(\"div\",{style:rootStyle,children:[/*#__PURE__*/_jsx(\"style\",{children:`\n                .protected-contact-grid {\n                    display: grid;\n                    grid-template-columns: repeat(2, minmax(0, 1fr));\n                    gap: var(--protected-contact-gap);\n                }\n\n                .protected-contact-button,\n                .protected-contact-link {\n                    transition: color 0.18s ease, text-decoration-color 0.18s ease, opacity 0.18s ease;\n                    text-decoration-color: currentColor;\n                }\n\n                .protected-contact-button:hover,\n                .protected-contact-link:hover {\n                    color: var(--protected-contact-text);\n                    opacity: 1;\n                    text-decoration: underline;\n                }\n\n                .protected-contact-button:focus-visible,\n                .protected-contact-link:focus-visible {\n                    outline: 2px solid var(--protected-contact-accent);\n                    outline-offset: 3px;\n                }\n\n                .protected-contact-label {\n                    font-size: 11px;\n                    line-height: 1.2;\n                    letter-spacing: 0.08em;\n                    text-transform: uppercase;\n                    color: var(--protected-contact-text);\n                    opacity: 0.72;\n                    margin: 0;\n                }\n\n                .protected-contact-live {\n                    min-height: 44px;\n                    display: flex;\n                    align-items: center;\n                    min-width: 0;\n                }\n\n                @media (max-width: 640px) {\n                    .protected-contact-grid {\n                        grid-template-columns: 1fr;\n                        gap: 24px;\n                    }\n                }\n            `}),/*#__PURE__*/_jsxs(\"div\",{className:\"protected-contact-grid\",style:{gridTemplateColumns:showEmail&&showPhone?\"repeat(2, minmax(0, 1fr))\":\"1fr\"},children:[showEmail?/*#__PURE__*/_jsxs(\"div\",{style:itemStyle,children:[/*#__PURE__*/_jsx(\"p\",{className:\"protected-contact-label\",children:\"E-MAIL\"}),/*#__PURE__*/_jsx(\"div\",{id:emailResultId,\"aria-live\":\"polite\",\"aria-atomic\":\"true\",className:\"protected-contact-live\",children:emailRevealed?/*#__PURE__*/_jsxs(\"span\",{style:{display:\"inline-flex\",alignItems:\"center\",gap:4,flexWrap:\"wrap\"},children:[emailPrefix?/*#__PURE__*/_jsx(\"span\",{children:emailPrefix}):null,/*#__PURE__*/_jsx(\"a\",{className:\"protected-contact-link\",href:`mailto:${emailValue}`,style:linkStyle,children:emailValue})]}):/*#__PURE__*/_jsx(\"button\",{className:\"protected-contact-button\",type:\"button\",\"aria-expanded\":emailRevealed,\"aria-controls\":emailResultId,onClick:()=>startTransition(()=>setEmailRevealed(true)),style:revealControlStyle,children:emailTriggerLabel})})]}):null,showPhone?/*#__PURE__*/_jsxs(\"div\",{style:itemStyle,children:[/*#__PURE__*/_jsx(\"p\",{className:\"protected-contact-label\",children:\"TELEFON\"}),/*#__PURE__*/_jsx(\"div\",{id:phoneResultId,\"aria-live\":\"polite\",\"aria-atomic\":\"true\",className:\"protected-contact-live\",children:phoneRevealed?/*#__PURE__*/_jsx(\"a\",{className:\"protected-contact-link\",href:`tel:${phoneHrefValue}`,style:linkStyle,children:phoneDisplayValue}):/*#__PURE__*/_jsx(\"button\",{className:\"protected-contact-button\",type:\"button\",\"aria-expanded\":phoneRevealed,\"aria-controls\":phoneResultId,onClick:()=>startTransition(()=>setPhoneRevealed(true)),style:revealControlStyle,children:phoneTriggerLabel})})]}):null]})]});}addPropertyControls(ProtectedDirectContact,{backgroundColor:{type:ControlType.Color,title:\"Background\",defaultValue:\"#FFFFFF\"},borderColor:{type:ControlType.Color,title:\"Border\",defaultValue:\"#EEEEEE\"},textColor:{type:ControlType.Color,title:\"Text\",defaultValue:\"#000000\"},accentColor:{type:ControlType.Color,title:\"Accent\",defaultValue:\"#000000\"},cornerRadius:{type:ControlType.Number,title:\"Radius\",defaultValue:12,min:0,max:40,step:1},gap:{type:ControlType.Number,title:\"Gap\",defaultValue:12,min:0,max:40,step:1},showEmail:{type:ControlType.Boolean,title:\"Show Email\",defaultValue:true},showPhone:{type:ControlType.Boolean,title:\"Show Phone\",defaultValue:true},emailTriggerLabel:{type:ControlType.String,title:\"Email Label\",defaultValue:\"E-mail c\\xedm megjelen\\xedt\\xe9se\"},phoneTriggerLabel:{type:ControlType.String,title:\"Phone Label\",defaultValue:\"Telefonsz\\xe1m megjelen\\xedt\\xe9se\"},emailPrefix:{type:ControlType.String,title:\"Email Prefix\",defaultValue:\"\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"ProtectedDirectContact\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerSupportedLayoutWidth\":\"any-prefer-fixed\",\"framerSupportedLayoutHeight\":\"auto\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./ProtectedDirectContact.map"],"mappings":"+LAGG,SAAwB,EAAuB,EAAM,CAAC,GAAK,CAAC,kBAAgB,UAAU,cAAY,UAAU,YAAU,UAAU,cAAY,UAAU,eAAa,GAAG,MAAI,GAAG,YAAU,GAAK,YAAU,GAAK,oBAAkB,2BAAoC,oBAAkB,4BAAqC,cAAY,GAAG,SAAO,EAAW,CAAC,EAAc,GAAkBA,EAAS,EAAK,EAAO,CAAC,EAAc,GAAkBA,EAAS,EAAK,EAC3b,EAAWC,EAAM,EAAQ,EAAc,GAAG,EAAW,eAAqB,EAAc,GAAG,EAAW,eACtG,EAAW,EAAc,CAAC,OAAO,UAAU,IAAI,QAAQ,IAAI,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE,GAAS,EAAkB,EAAc,CAAC,MAAM,KAAK,MAAM,KAAK,IAAI,CAAC,CA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