             case .finalSetup:
                 return .finalSetup
             case .image:
-                return .image
+                return getImageAction(with: data)
             case .reference:
-                return .reference
+                return getReferenceAction(with: data)
             case .pronunciation:
-                return .pronunciation
+                return getPronunciationAction(with: data)
             case .edit:
                 return getEditAction(with: data)
             case .addTitleDescription:

        case viewInBrowser
        case leadImage(source: String, width: Int?, height: Int?)
        case tableOfContents(items: [TableOfContentsItem])
    }
    
    /// PCSActions are receieved from the JS bridge and converted into actions

        
        func getLinkAction(with data: [String: Any]?) -> Action? {
            guard let title = data?[LinkKey.title.rawValue] as? String else {
                return nil
            }
            return .link(title: title)
        }
        
        func getEditAction(with data: [String: Any]?) -> Action? {
            guard let sectionIDString = data?["sectionId"] as? String, let sectionID = Int(sectionIDString) else {
                return nil
            }
            return .edit(sectionID: sectionID, descriptionSource: data?["descriptionSource"] as? String)
        }
        
        func getImageAction(with data: [String: Any]?) -> Action? {
            guard let src = data?["src"] as? String, let href = data?["href"] as? String else {
                return nil
            }
            let width = data?["data-file-width"] as? Int
            let height = data?["data-file-height"] as? Int
            return .image(src: src, href: href, width: width, height: height)
        }
        
        func getReferenceAction(with data: [String: Any]?) -> Action? {
            guard let selectedIndex = data?["selectedIndex"] as? Int, let groupArray = data?["referencesGroup"] as? [[String: Any]]  else {
                return nil
            }
            let group = groupArray.compactMap { Reference.from(data: $0) }
            return .reference(selectedIndex: selectedIndex, group: group)
        }
        
        func getPronunciationAction(with data: [String: Any]?) -> Action? {
            guard let urlString = data?["url"] as? String, let url = URL(string: urlString) else {
                return nil
            }
            return .pronunciation(url: url)
        }
    }
    
