{"version":3,"file":"Adaptive.C40DI265.mjs","names":["useState"],"sources":["https:/framerusercontent.com/modules/tDLBrdzhuLuTO2Vozf7m/aW6rCGWEP5voCbQJHmSE/Adaptive.js"],"sourcesContent":["// Adaptive Personalization - Escalation Stage Visualization\nimport{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import{useState,useEffect}from\"react\";import{addPropertyControls,ControlType}from\"framer\";import{motion}from\"framer-motion\";const STAGE_STAGGER_MS=120;const STAGE_DURATION_MS=400;const DEFAULT_STAGES=[{stageLabel:\"1st Trip\",stageLabelColor:\"#DBEAFE\",stageLabelTextColor:\"#1D4ED8\",description:\"Helpful orientation: policy overview, preferred suppliers, how to use the OBT effectively.\"},{stageLabel:\"2nd Violation\",stageLabelColor:\"#FEF3C7\",stageLabelTextColor:\"#92400E\",description:\"Messaging becomes more direct and specific. Peer comparison data added. No manager involvement needed.\"},{stageLabel:\"3 Advance Bookings\",stageLabelColor:\"#D1FAE5\",stageLabelTextColor:\"#065F46\",description:\"Positive reinforcement activates automatically. Escalation pauses. Guidance shifts to preferred supplier adoption.\"},{stageLabel:\"Program-Wide\",stageLabelColor:\"#F3E8FF\",stageLabelTextColor:\"#6B21A8\",description:\"Late booking pattern detected across a segment - advance booking nudges activate automatically. New preferred supplier added - attribute messaging switches on.\"}];/**\n * Adaptive Personalization Component\n *\n * @framerIntrinsicWidth 600\n * @framerIntrinsicHeight 700\n *\n * @framerSupportedLayoutWidth any\n * @framerSupportedLayoutHeight any\n */export default function Adaptive(props){const{cardTitle=\"Adaptive Personalization - Same Traveler Over Time\",escalationStages=DEFAULT_STAGES,cardBackgroundColor=\"#FFFFFF\",cardHeaderColor=\"rgb(20, 41, 97)\",cardFont,enableAnimation=true,loopDelayMs=4e3}=props;const[cycleKey,setCycleKey]=useState(0);useEffect(()=>{if(!enableAnimation)return;const animEnd=STAGE_STAGGER_MS*Math.max(0,escalationStages.length-1)+STAGE_DURATION_MS;const interval=setInterval(()=>setCycleKey(k=>k+1),animEnd+Math.max(0,loopDelayMs));return()=>clearInterval(interval);},[enableAnimation,loopDelayMs,escalationStages.length]);return /*#__PURE__*/_jsxs(\"div\",{style:{...props.style,width:\"100%\",height:\"100%\",backgroundColor:cardBackgroundColor,borderRadius:\"16px\",overflow:\"hidden\",border:\"1px solid #CBD5E1\",boxShadow:\"0 4px 16px rgba(15,23,42,0.08)\",display:\"flex\",flexDirection:\"column\"},children:[/*#__PURE__*/_jsx(\"div\",{style:{backgroundColor:cardHeaderColor,color:\"#FFFFFF\",padding:\"16px 24px\",fontSize:\"13px\",letterSpacing:\"0.01em\",...cardFont},children:cardTitle}),/*#__PURE__*/_jsx(\"div\",{style:{padding:\"24px\",display:\"flex\",flexDirection:\"column\",gap:\"10px\",flex:1,overflow:\"auto\"},children:escalationStages.map((stage,index)=>/*#__PURE__*/_jsx(EscalationCardComponent,{...stage,cardFont:cardFont,index:index,isLast:index===escalationStages.length-1,enableAnimation:enableAnimation},`${cycleKey}-${index}`))})]});}function EscalationCardComponent({stageLabel,stageLabelColor,stageLabelTextColor,description,cardFont,index,isLast,enableAnimation}){return /*#__PURE__*/_jsxs(motion.div,{initial:enableAnimation?{opacity:0,y:12}:false,animate:enableAnimation?{opacity:1,y:0}:{},transition:enableAnimation?{duration:STAGE_DURATION_MS/1e3,ease:\"easeOut\",delay:index*STAGE_STAGGER_MS/1e3}:{},style:{borderRadius:\"10px\",border:\"1px solid #E2E8F0\",overflow:\"hidden\"},children:[/*#__PURE__*/_jsxs(\"div\",{style:{backgroundColor:stageLabelColor,padding:\"8px 16px\",display:\"flex\",alignItems:\"center\",gap:\"8px\"},children:[/*#__PURE__*/_jsx(\"div\",{style:{width:\"6px\",height:\"6px\",borderRadius:\"50%\",backgroundColor:stageLabelTextColor,flexShrink:0,opacity:.7}}),/*#__PURE__*/_jsx(\"span\",{style:{color:stageLabelTextColor,fontSize:\"11px\",fontWeight:700,textTransform:\"uppercase\",letterSpacing:\"0.08em\",...cardFont},children:stageLabel})]}),/*#__PURE__*/_jsx(\"div\",{style:{padding:\"12px 16px\",backgroundColor:\"#FFFFFF\"},children:/*#__PURE__*/_jsx(\"p\",{style:{margin:0,color:\"#334155\",fontSize:\"13px\",lineHeight:\"1.55\",...cardFont},children:description})})]});}addPropertyControls(Adaptive,{cardTitle:{type:ControlType.String,title:\"Card Title\",defaultValue:\"Adaptive Personalization - Same Traveler Over Time\"},enableAnimation:{type:ControlType.Boolean,title:\"Animation\",defaultValue:true,enabledTitle:\"On\",disabledTitle:\"Off\"},loopDelayMs:{type:ControlType.Number,title:\"Loop Pause\",description:\"ms pause after last stage before restarting\",defaultValue:4e3,min:0,max:3e4,step:500},escalationStages:{type:ControlType.Array,title:\"Escalation Stages\",control:{type:ControlType.Object,controls:{stageLabel:{type:ControlType.String,title:\"Stage Label\",defaultValue:\"Stage\"},stageLabelColor:{type:ControlType.Color,title:\"Label Background\",defaultValue:\"#DBEAFE\"},stageLabelTextColor:{type:ControlType.Color,title:\"Label Text Color\",defaultValue:\"#1D4ED8\"},description:{type:ControlType.String,title:\"Description\",defaultValue:\"Stage description\",displayTextArea:true}}},defaultValue:DEFAULT_STAGES},cardBackgroundColor:{type:ControlType.Color,title:\"Card Background\",defaultValue:\"#FFFFFF\"},cardHeaderColor:{type:ControlType.Color,title:\"Card Header\",defaultValue:\"rgb(20, 41, 97)\"},cardFont:{type:ControlType.Font,title:\"Card Font\",controls:\"extended\",defaultFontType:\"sans-serif\",defaultValue:{fontSize:\"14px\",variant:\"Medium\",letterSpacing:\"-0.01em\",lineHeight:\"1.4em\"}}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"Adaptive\",\"slots\":[],\"annotations\":{\"framerSupportedLayoutHeight\":\"any\",\"framerSupportedLayoutWidth\":\"any\",\"framerContractVersion\":\"1\",\"framerIntrinsicWidth\":\"600\",\"framerIntrinsicHeight\":\"700\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./Adaptive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